Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
V2 1.2.0
-
None
Description
When using the EntityProvider.writeBatchRequest(batchParts, boundar); method to create a $batch request which contains BatchChangeSetParts the calculated Content-Length of the changeset body part is not correct (regarding to "http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html").
This results in exception when using strict multipart parsers (like sample service at "http://services.odata.org/V2/OData/OData.svc/$batch") which response with:
--batchresponse_bbd3caec-0224-49c9-8bf0-75a1365853fb Content-Type: multipart/mixed; boundary=changesetresponse_054f8f41-e12f-46bb-922b-3dc234e2f27b <?xml version="1.0" encoding="utf-8" standalone="yes"?> <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <code></code> <message xml:lang="en-US">Error processing batch request. The request is not a valid batch request.</message> </error> --batchresponse_bbd3caec-0224-49c9-8bf0-75a1365853fb--
For sample request and code snippet see attached files.