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

Set the contentLength on the AtmosphereRequest. #35

Merged
merged 1 commit into from
Apr 5, 2013

Conversation

thabach
Copy link
Member

@thabach thabach commented Apr 5, 2013

Hi JeanFrancois

the contentLength is not correctly reported from the AtmosphereRequest as createAtmosphereRequest in the NettyAtmosphereHandler has no means of setting it (it is always 0, stemming from NoOpsRequest, I think). There is no HttpServletRequest object it could set on the Builder.request field. I would thus suggest to :

  • introduce a contentLength field in the Builder (see my complementing pull request in Atmosphere) , with a defensive extension to the getContentLength() method of AtmosphereRequest.
  • and change createAtmosphereRequest to retrieve the contentLength from the headers and set the newly introduced Builder field for contentLength.

This is only a proposal, maybe there is a more elegant way to have the AtmosphereRequest reflect the proper content length.

Cheers, Christian.

@buildhive
Copy link

Atmosphere Framework » nettosphere #115 FAILURE
Looks like there's a problem with this pull request
(what's this?)

jfarcand added a commit that referenced this pull request Apr 5, 2013
Set the contentLength on the AtmosphereRequest.
@jfarcand jfarcand merged commit 9a70136 into Atmosphere:master Apr 5, 2013
@jfarcand
Copy link
Member

jfarcand commented Apr 5, 2013

Thanks. Really good catch!

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

Successfully merging this pull request may close these issues.

3 participants