[
https://issues.apache.org/jira/browse/GERONIMO-3860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569355#action_12569355
]
Sangjin Lee commented on GERONIMO-3860:
---------------------------------------
It's somewhat tricky due to the nature of the decoder. The decoder is strictly
line based. As soon as a full line is read and accepted, the decoder advances
the position in the buffer. Therefore, the line parsing logic itself will
probably need to be modified not to stop at a CRLF followed by a LWSP
character. That also involves looking one byte ahead and rewind if the
character that follows CRLF is *not* a LWSP character.
I'll explore possible fixes, but I'd like to work closely with you on this...
Thanks!
> HttpResponseDecoder does not handle folded headers properly
> -----------------------------------------------------------
>
> Key: GERONIMO-3860
> URL: https://issues.apache.org/jira/browse/GERONIMO-3860
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: AsyncHttpClient
> Affects Versions: 1.x
> Reporter: Sangjin Lee
> Assignee: Rick McGuire
> Priority: Minor
>
> HttpResponseDecoder makes an assumption that headers complete in a single
> line ended by CRLF. The HTTP RFC (along with RFC 822) permits a single
> header spanning multiple lines. Such folding can be detected by detecting
> the leading LWSP char (either a space or a horizontal tab).
> HttpResponseDecoder needs to handle this properly. Currently it throws a
> ProtocolDecoderException (StringIndexOutOfBoundsException underneath).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.