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 2014/12/02 08:15:12 UTC
[jira] [Resolved] (OLINGO-500) Batch Body Parsing Issue
[ https://issues.apache.org/jira/browse/OLINGO-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Bolz resolved OLINGO-500.
---------------------------------
Resolution: Not a Problem
Hi [~autushka],
because our batch/mutlipart parser is based on the [multipart RFC 1341|http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html] an empty line must consists of / end with a {{CR LF}} and not only a {{LF}} (see chapter _7.2.1_).
Based on that we can not change the behaviour.
Kind regards,
Michael
> Batch Body Parsing Issue
> ------------------------
>
> Key: OLINGO-500
> URL: https://issues.apache.org/jira/browse/OLINGO-500
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
> Affects Versions: V2 2.0.1
> Reporter: Aleh Autushka
> Assignee: Michael Bolz
> Priority: Minor
> Fix For: V2 2.0.1
>
>
> Hello, I'm facing the next issue:
> When I try to execute a simple batch request with advanced rest client:
> /MyFormula.svc/$batch
> With payload:
> --batch
> Content-Type: application/http
> Content-Transfer-Encoding: binary
> GET Cars HTTP/1.1
> --batch--
> There an error happens:
> Expected empty line but was '[None]': line '4'.
> I use POST request type and Content-Type: multipart/mixed
> This error happens in the method:
> public static void consumeBlankLine(final List<Line> remainingMessage, final boolean isStrict)
> throws BatchException {
> if (remainingMessage.size() > 0 && remainingMessage.get(0).toString().matches("\\s*\r\n\\s*")) {
> remainingMessage.remove(0);
> } else {
> if (isStrict) {
> final int lineNumber = (remainingMessage.size() > 0) ? remainingMessage.get(0).getLineNumber() : 0;
> throw new BatchException(BatchException.MISSING_BLANK_LINE.addContent("[None]").addContent(lineNumber));
> }
> }
> }
> In my case empty line is "\n" and it does not match "\\s*\r\n\\s*".
> Thanks
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)