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

log response body when netty passes in a ByteBuf instead of a HttpContent #978

Merged
merged 1 commit into from
Mar 18, 2021
Merged

log response body when netty passes in a ByteBuf instead of a HttpContent #978

merged 1 commit into from
Mar 18, 2021

Conversation

noffke
Copy link
Contributor

@noffke noffke commented Mar 18, 2021

Description

Handle case where netty passes in a ByteBuf instead of an HttpContent. I've changed State#buffer to accept a ByteBuf directly instead of a HttpContent to avoid having to wrap the ByteBuf only to unwrap it again shortly after. I've unfortunately not found a good way to test this, i.e. a test is missing at this time.

Motivation and Context

Fixes #977

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@noffke noffke changed the title zalando/logbook#977 - log response when netty passes in a ByteBuf instead of a HttpContent log response when netty passes in a ByteBuf instead of a HttpContent Mar 18, 2021
@noffke noffke changed the title log response when netty passes in a ByteBuf instead of a HttpContent log response body when netty passes in a ByteBuf instead of a HttpContent Mar 18, 2021
@whiskeysierra
Copy link
Collaborator

I've unfortunately not found a good way to test this, i.e. a test is missing at this time.

Have you tested it with your application?

@noffke
Copy link
Contributor Author

noffke commented Mar 18, 2021

Have you tested it with your application?

@whiskeysierra yes, it works with my application.

@whiskeysierra
Copy link
Collaborator

👍

@whiskeysierra whiskeysierra merged commit 906e12f into zalando:main Mar 18, 2021
@noffke
Copy link
Contributor Author

noffke commented Mar 18, 2021

@whiskeysierra thanks a lot!

@whiskeysierra
Copy link
Collaborator

Thanks for the contribution! 🎉

I released your fix as 2.6.1 to central just now. Should be available soon.

@noffke noffke deleted the zalando-logbook-977 branch March 23, 2021 09:15
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.

logbook-netty in spring-cloud-gateway: response body not logged
2 participants