You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Michael Bolz (JIRA)" <ji...@apache.org> on 2016/05/07 05:22:12 UTC

[jira] [Commented] (OLINGO-945) Single blank line at end of batch part causes error.

    [ https://issues.apache.org/jira/browse/OLINGO-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15275092#comment-15275092 ] 

Michael Bolz commented on OLINGO-945:
-------------------------------------

Hi [~prilling],

The problem here is that the batch (multipart) parser is very strict.

According to [rfc1341-7.2 Multipart|https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html] there must be a {{CRLF}} between the body-part and the delimiter.
And for [HTTP|https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5] there must be a {{CRLF}} after the Request-Line.
And the Request-Line by itself end with a {{CRLF}}.

Accordingly there are three {{CRLF}} necessary to be fully conform to each specification.
However, I agree that most parser/service are not that strict and would also accept such a request.

Best 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)