Michael Bolz created OLINGO-256:
-----------------------------------
Summary: Incorrect Content-Length for ChangeSet in $batch
Key: OLINGO-256
URL: https://issues.apache.org/jira/browse/OLINGO-256
Project: Olingo
Issue Type: Bug
Components: odata2-core
Affects Versions: V2 1.2.0
Reporter: Michael Bolz
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:
{code}
--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--
{code}
For sample request and code snippet see attached files.
--
This message was sent by Atlassian JIRA
(v6.2#6252)