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

Provide response size to bodyEndHandler on HttpServerResponse #1198

Closed
wants to merge 1 commit into from

Conversation

@stampy88
Copy link
Contributor

stampy88 commented Nov 13, 2015

Currently it is very difficult to write an access log containing the response size for a chunked response. By adding the response size as the parameter to the bodyEndHandler it simplifies this tremendously. Have a subsequent PR for vertx-web when this is merged.

Signed-off-by: Dave Sinclair stampy88@yahoo.com

Currently it is very difficult to write an access log containing the response size for a chunked response. By adding the response size as the parameter to the bodyEndHandler it simplifies this tremendously.

Signed-off-by: Dave Sinclair <stampy88@yahoo.com>
@purplefox purplefox added the to review label Nov 13, 2015
@purplefox

This comment has been minimized.

Copy link
Contributor

purplefox commented Nov 20, 2015

Hi Stampy,

Unfortunately we can't do it this way as it would involve an incompatible change on a public API (we must maintain backwards compatibility in minor or point releases).

A different way to do this and which would preserve backwards compatibility would be to keep the signature of the body end handler the same but to expose a new method bytesWritten() which could called from inside the bodyEndHandler.

@purplefox purplefox closed this Nov 20, 2015
@purplefox purplefox removed the to review label Nov 20, 2015
@stampy88

This comment has been minimized.

Copy link
Contributor Author

stampy88 commented Nov 20, 2015

Understood Tim. I was hoping with Java 8 no one was typing Handler, but need to think of the Java 7 guys too. I'll create a new PR shortly with your suggestion.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.