Skip to main content
Question

Duplicate Content-Length headers in response from odata batch


Forum|alt.badge.img+2
  • Do Gooder (Customer)
  • 4 replies

When doing odata batch-requests in APP10, the response contains duplicate Content-Length headers. I’m using .net package Simple.OData.Client to call the API, and this client detects this as an error and throws an exception: “

The header 'Content-Length' was specified multiple times. Each header must appear only once in a batch part.

The actions i invoke in the batch:

PrePostSave(Init = true)

<update shop-order-operation>

PrePostSave(Init = false)

And it is the PrePostSave actions that return the duplicate Content-Length headers.

Has anyone also had this problem, and found a solution?

 

The response i get is:

With errors highlighted in this style

 

--batch_76048087-845d-43fe-8bfd-6bc74ab4adef



Content-Type: multipart/mixed; boundary=changeset_a32e7278-3e2a-40db-b74d-4672974ed52b

--changeset_a32e7278-3e2a-40db-b74d-4672974ed52b



Content-Type: application/http



Content-Transfer-Encoding: binary



Content-ID: 1

HTTP/1.1 204 No Content



OData-Version: 4.0



Content-Length: 0



Content-Language: en-US



Content-Length: 0


--changeset_a32e7278-3e2a-40db-b74d-4672974ed52b



Content-Type: application/http



Content-Transfer-Encoding: binary



Content-ID: 2

HTTP/1.1 200 OK



OData-Version: 4.0



ETag: W/"Vy8iQUFBYU1UQUFWQUFJdklBQUFKOjIwMjUwMzAzMjAwNjIzIg=="



OData-EntityID: https://xxxxxxx:58080/main/ifsapplications/projection/v1/ShopOrderOperationsHandling.svc/ShopOrderOperations(OrderNo='2268244',ReleaseNo='%2A',SequenceNo='%2A',OperationNo=10)



Location: https://xxxxxxx:58080/main/ifsapplications/projection/v1/ShopOrderOperationsHandling.svc/ShopOrderOperations(OrderNo='2268244',ReleaseNo='%2A',SequenceNo='%2A',OperationNo=10)



Content-Language: en-US



Content-Type: application/json;ieee754compatible=true;odata.metadata=full



Content-Length: 14913

{"@odata.context":"……………..."}



--changeset_a32e7278-3e2a-40db-b74d-4672974ed52b



Content-Type: application/http



Content-Transfer-Encoding: binary



Content-ID: 3

HTTP/1.1 204 No Content



OData-Version: 4.0



Content-Length: 0



Content-Language: en-US



Content-Length: 0


--changeset_a32e7278-3e2a-40db-b74d-4672974ed52b--



--batch_76048087-845d-43fe-8bfd-6bc74ab4adef--

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings