[
https://issues.apache.org/jira/browse/HTTPCLIENT-845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oleg Kalnichevski resolved HTTPCLIENT-845.
------------------------------------------
Resolution: Invalid
RFC 822
---
3.1.1. LONG HEADER FIELDS
Each header field can be viewed as a single, logical line of
ASCII characters, comprising a field-name and a field-body.
For convenience, the field-body portion of this conceptual
entity can be split into a multiple-line representation; this
is called "folding". The general rule is that wherever there
may be linear-white-space (NOT simply LWSP-chars), a CRLF
immediately followed by AT LEAST one LWSP-char may instead be
inserted. ...
---
emphasis on (NOT simply LWSP-chars).
Oleg
> commons-httpclient-3.1 not parsing the multi-line response headers correctly
> ----------------------------------------------------------------------------
>
> Key: HTTPCLIENT-845
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-845
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 3.1 Final
> Environment: Win 2003
> Reporter: Robin Gandhi
> Priority: Blocker
>
> The parseHeaders() methods inside the HttpParser
> class(org.apache.commons.httpclient.HttpParser) is not parsing the Multi-line
> response heders correctly.
> For example if it recieves the below response:
> HTTP/1.1 200 OK\r\n
> Connection: line-1\r\n
> X-Multiline: line-0\r\n
> \t line-1: value\r\n
> \t line-2: value\r\n
> \t line-3: value\r\n
> \t line-4: value\r\n
> \t\r\n
> \t line-6: value\r\n
> \t line-7: value\r\n
> \t line-8: value\r\n
> \t line-9: value\r\n
> \t\r\n
> \t line-11: value\r\n
> \t line-12: value\r\n
> \t line-13: value\r\n
> \t line-14: value\r\n
> \t\r\n
> \t line-16: value\r\n
> Date: Wed, 10 Dec 2008 08:03:34 GMT\r\n
> Content-Length: 15\r\n
> Connection: close\r\n
> \r\n
> body-ngjchvpzos
> It will consider the first few lines(as shown blow) as response headers but
> whaever is there after "\t\r\n" it considers it as response data due to the
> presence of blank line
> HTTP/1.1 200 OK\r\n
> Connection: line-1\r\n
> X-Multiline: line-0\r\n
> \t line-1: value\r\n
> \t line-2: value\r\n
> \t line-3: value\r\n
> \t line-4: value\r\n
> Http Specs say that "HTTP/1.1 header field values can be folded onto multiple
> lines if the Continuation line begins with a space or horizontal tab".
> In the above case even though the line is starting with tab("\t\r\n")
> HttpParser class is not considering it as part of Multi line response header.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]