[JBoss JIRA] Closed: (NETTY-250) HttpMessageDecoder violates HTTP/1.0 by converting a message into chunked encoding

Trustin Lee (JIRA) jira-events at lists.jboss.org
Tue Nov 17 02:53:29 EST 2009


     [ https://jira.jboss.org/jira/browse/NETTY-250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trustin Lee closed NETTY-250.
-----------------------------

    Resolution: Done


HttpMessageDecoder does not add or update the Transfer-Encoding header anymore.  Instead, HttpMessage maintains an additional boolean flag to determine if the content is being split.

I did not rename HttpMessage.isChunked() and HttpChunk yet because I don't like the proposed names.  Javadoc has been updated to reflect the changes related with this issue for less confusion.  Please feel free to suggest the better names for HttpMessage.isChunked(), HttpChunk, and HttpChunkTrailer.

There's no need for user code change regarding this issue as long as the user uses HttpMessage.isChunked() to determine the transfer encoding rather than scanning the header manually.


> HttpMessageDecoder violates HTTP/1.0 by converting a message into chunked encoding
> ----------------------------------------------------------------------------------
>
>                 Key: NETTY-250
>                 URL: https://jira.jboss.org/jira/browse/NETTY-250
>             Project: Netty
>          Issue Type: Bug
>          Components: Handler
>            Reporter: Trustin Lee
>            Assignee: Trustin Lee
>             Fix For: 3.2.0.ALPHA2
>
>
> If HttpMessageDecoder encounters a message with large content, it automatically converts the message into chunked encoding by 1) adding 'Transfer-Encoding: chunked' header and 2) splitting the content into multiple HttpChunk messages.  However, this behavior violates the HTTP/1.0 specification because there's no chunked encoding in HTTP/1.0 - it's introduced in 1.1.
> To address this issue:
> 1) HttpMessageDecoder should not add or alter the 'Transfer-Encoding' header, so that the original headers are retained,
> 2) HttpMessage.isChunked() should be replaced with HttpMessage.hasPartialContents()
> 3) HttpChunk has to be replaced with HttpPartialContent to detach the message model from the protocol encoding
> To support trailing headers, HttpChunk could be retained and some header manipulation and retrieval methods could be added there, but it needs to be resolved in another issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the netty-dev mailing list