OData Batch Response mismatch

Topics: ASP.NET Web API
Apr 21, 2014 at 11:39 AM
Edited Apr 21, 2014 at 11:40 AM
As per the OData.org page on batch processing:
http://www.odata.org/documentation/odata-version-3-0/batch-processing/

I should be getting back changesetresponse and batchresponse boundary GUIDs that match the changeset and batch boundaries I set in my request.

I'm getting back a random GUID against the response which doesn't match.

I'm manually working around it due to only submitting single batches within each request but it could get problematic if multiple batches were submitted at once (particularly in trying to determine which batch failed!).

Mini-example (REQUEST):
--batch_95F7BEDB-F48A-406A-A950-551F8C153E0A
Content-Type: multipart/mixed; boundary=changeset_AC1A4ED3-3E7A-4543-BA53-7C3545867405

--changeset_AC1A4ED3-3E7A-4543-BA53-7C3545867405
Content-Type: application/http
Content-Transfer-Encoding: binary

PUT https://server/service/live/Locations(guid'7e3f741f-0060-44f3-936b-17654ab76f14') HTTP/1.1
Content-ID: 1
Accept: application/json;odata=verbose;
Content-Type: application/json;type=entry;charset=utf-8
Host: server
Content-Length: 366

JSON
--changeset_AC1A4ED3-3E7A-4543-BA53-7C3545867405
Content-Type: application/http
Content-Transfer-Encoding: binary

PUT https://server/service/live/Properties(guid'ab22540a-f9b3-406b-b2f3-ff32d16f9ad2') HTTP/1.1
Content-ID: 2
Accept: application/json;odata=verbose;
Content-Type: application/json;type=entry;charset=utf-8
Host: server
Content-Length: 528

JSON
--changeset_AC1A4ED3-3E7A-4543-BA53-7C3545867405--
--batch_95F7BEDB-F48A-406A-A950-551F8C153E0A--

MiniExample(RESPONSE):
--batchresponse_7ae0240f-4a9c-48b7-bdee-056ec4b9122e

Content-Type: multipart/mixed; boundary=changesetresponse_f6c32b4c-9dd6-40de-a8f3-6b39716a1a2e

--changesetresponse_f6c32b4c-9dd6-40de-a8f3-6b39716a1a2e
Content-Type: application/http
Content-Transfer-Encoding: binary

HTTP/1.1 204 No Content
Content-ID: 1

--changesetresponse_f6c32b4c-9dd6-40de-a8f3-6b39716a1a2e
Content-Type: application/http
Content-Transfer-Encoding: binary

HTTP/1.1 204 No Content
Content-ID: 1
--changesetresponse_f6c32b4c-9dd6-40de-a8f3-6b39716a1a2e--
--batchresponse_7ae0240f-4a9c-48b7-bdee-056ec4b9122e--