Skip to content

Conversation

@FranklinYinanDing
Copy link
Contributor

Fixes the issue of "204/304 response didn't trigger onDoneEnumerating for the body", which @bbarkley has reported.

When the response status is 204 or 304, the response doesn't send out with a body. The case of StreamWithNoBody in both Netty server and Akka HTTP server didn't consume the response's empty Enumerator body, thus the onDoneEnumerating hook couldn't be triggered.

Added tests, which fail without the fix.

Create this pull request on behalf of @bbarkley.

@lightbend-cla-validator

Hi @FranklinYinanDing,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http://www.lightbend.com/contribute/cla

@FranklinYinanDing
Copy link
Contributor Author

Signed the CLA.

@FranklinYinanDing
Copy link
Contributor Author

May I ask what is the equivalent of the body Enumerator's onDoneEnumerating hook in 2.6.x? I want to verify whether the 2.6.x version has the same issue. Thanks!

@FranklinYinanDing FranklinYinanDing changed the title 204/304 response should also trigger onDoneEnumerating for the body [2.4.x] 204/304 response should also trigger onDoneEnumerating for the body Feb 28, 2017
@marcospereira marcospereira added this to the 2.4.11 milestone Mar 6, 2017
@FranklinYinanDing
Copy link
Contributor Author

Bump! Please review!

@marcospereira
Copy link
Member

@FranklinYinanDing, this looks good to me.

I've submitted two other pull requests against branch 2.4.x to fix other small problems: #7048 and #7039.

They were already merged. Do you mind rebasing your branch against the most 2.4.x again so that we can see if the build is more stable after these changes?

@FranklinYinanDing
Copy link
Contributor Author

@marcospereira Done! Thank you!

@marcospereira marcospereira merged commit 11290a7 into playframework:2.4.x Mar 9, 2017
@marcospereira
Copy link
Member

Thank you, @FranklinYinanDing!

@FranklinYinanDing
Copy link
Contributor Author

@marcospereira May I ask what is the equivalent of the body Enumerator's onDoneEnumerating hook in 2.6.x? I want to verify whether the 2.6.x version has the same issue. Thanks!

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