Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpMessageEncoder should add Header "Transfer-Encoding: chunked" if HttpMessage.isChunked() #171

Closed
normanmaurer opened this issue Jan 31, 2012 · 7 comments
Assignees
Milestone

Comments

@normanmaurer
Copy link
Member

If HttpMessage.getChunked() is true, we should make sure we also add the "Transfer-Encoding: chunked" header to the message if its not already present. This should be what the user / dev does also expect here.

@ghost ghost assigned normanmaurer Jan 31, 2012
@normanmaurer
Copy link
Member Author

@trustin As this is kind of not backward compatible, do we also want to have it in 3.3.x ?

@normanmaurer
Copy link
Member Author

We should also adjust the javadocs in HttpMessage then...

@trustin
Copy link
Member

trustin commented Feb 2, 2012

It's an expected behavior. HttpMessageDecoder splits the content into multiple HttpChunks and calls setChunked(true) if the content length is large. It doesn't necessarily mean that the HTTP message's encoding is chunked. But yeah, it's better document this behavior more clearly.

@normanmaurer
Copy link
Member Author

Thats true here.. but what about if you use it for HttpResponse's ? I think there it makes sense..

@trustin
Copy link
Member

trustin commented Feb 2, 2012

Oh I see. Then what about modifying HttpMessageEncoder so that it sets the Transfer-encoding header if HttpMessage.isChunked() is true (unless it's set already)?

@normanmaurer
Copy link
Member Author

Yeah.. That will make most sense I guess... Let me do it and also make things more clear in the apidocs.

normanmaurer added a commit that referenced this issue Feb 2, 2012
normanmaurer added a commit that referenced this issue Feb 2, 2012
@normanmaurer
Copy link
Member Author

Ok the HttpMessageEncoder does now add the header if its not present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants