-
Notifications
You must be signed in to change notification settings - Fork 11
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
304 Not Modified response includes body #341
Comments
It looks like this is caused by the Compress middleware compressing the empty response generated by the Etag middleware. |
Thanks for the report. It is spot on and we were able to reproduce it with Go SDK. You're right that the order of middleware fns matters. We can't just swap the order of Etag and Compress since it introduces another bug. |
This includes the fix for returning a NoneBody rather than a Sized(0) body, allowing the Compress middleware to just not process our response. Thanks to @phooijenga for the PR on https://github.com/chriswk/actix-middleware-etag Fixes: #341
Since @phooijenga was so kind as to make a PR with the fix against our ETag middleware, I've made a new release with that fix, and a PR is in the works #342 |
This includes the fix for returning a NoneBody rather than a Sized(0) body, allowing the Compress middleware to just not process our response. Thanks to @phooijenga for the PR on https://github.com/chriswk/actix-middleware-etag Fixes: #341
Describe the bug
After adding Unleash to one of our Go projects we noticed a stream of log messages like these:
After some further investigation we found that the 304 Not Modified responses from Unleash Edge include a chunked and compressed response body (the 14... and further).
RFC 9110 § 15.4.5 says:
Steps to reproduce the bug
Expected behavior
No response
Logs, error output, etc.
No response
Screenshots
Additional context
No response
Unleash version
v5.6.7, Edge v16.0.3, Go Client v4.3.1
Subscription type
None
Hosting type
None
SDK information (language and version)
No response
The text was updated successfully, but these errors were encountered: