[
https://issues.apache.org/jira/browse/OLINGO-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15275499#comment-15275499
]
Michael Bolz commented on OLINGO-945:
-------------------------------------
Hi [~prilling],
With only _ONE_ blank line it would be not complete conform to the HTTP/OData
specification.
However, I again agree that libraries exists which are not that strict in cases
where there is only one CRLF.
In Olingo the _batch parser_ could be also used in a _not strict_ mode. However
this is actual no option which could be set via the API.
Perhaps you could start a discussion on the mailinglist whether this mode
should be made available via the {{EntityProviderBatchProperties}} in the API.
And the example on the odata.org page is unfortunatelly wrong.
In the official [documentation from
Microsoft|https://msdn.microsoft.com/en-us/library/dd541538.aspx] there are two
blank lines (and accordingly three CRLF).
Kind Regards, Michael
> Single blank line at end of batch part causes error.
> ----------------------------------------------------
>
> Key: OLINGO-945
> URL: https://issues.apache.org/jira/browse/OLINGO-945
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
> Affects Versions: V2 2.0.6
> Reporter: Peter Rilling
>
> When constructing batch requests, if there is less than two blank lines
> before the closing batch part marker, you get the error "Expected empty line
> but was '[None]'".
> For example, the following works:
> {code}--batch_36522ad7-fc75-4b56-8c71-56071383e77b
> Content-Type: application/http
> GET Pages HTTP/1.1
> --batch_36522ad7-fc75-4b56-8c71-56071383e77b--{code}
> But the following does not:
> {code}--batch_36522ad7-fc75-4b56-8c71-56071383e77b
> Content-Type: application/http
> GET Pages HTTP/1.1
> --batch_36522ad7-fc75-4b56-8c71-56071383e77b--{code}
> Notice how the only difference is the number of lines after the GET.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)