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

bug: Skip brotli compression if upstream response is compressed #10739

Closed
SilentEntity opened this issue Jan 2, 2024 · 2 comments · Fixed by #10740
Closed

bug: Skip brotli compression if upstream response is compressed #10739

SilentEntity opened this issue Jan 2, 2024 · 2 comments · Fixed by #10740
Assignees

Comments

@SilentEntity
Copy link
Contributor

Current Behavior

If the upstream response contains Content-Encoding header , then the data needs to be decompressed to compress it to brotli. Therefore, skipping the brotli compression for already compressed upstream data will avoid returning wrong encoded data in response from apisix.

Expected Behavior

Apisix should not compressed gzip or deflate upstream compressed data again in brotli. Skipping the compression will solve the issue.

Example:
If the upstream service is returning a response in gzip or header Content-Encoding: gzip. Return the same.

Error Logs

Not applicable.

Steps to Reproduce

  1. Build an Apisix master branch.
  2. Enable brotli plugin in global rules.
  3. One should have an upstream that returns a gzip or deflate encoded data.

Environment

  • APISIX version (run apisix version): master
  • Operating system (run uname -a): debian
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):
@SilentEntity
Copy link
Contributor Author

One can assign it to me. :)

@Vacant2333
Copy link
Contributor

Vacant2333 commented Jan 2, 2024

@shreemaan-abhishek hello, pls help assign to @SilentEntity ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants