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

fix(ai-proxy): fix ai-proxy plugin processing gzip response content l… #13961

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

oowl
Copy link
Member

@oowl oowl commented Dec 2, 2024

…enth issue

Summary

When Kong tried to compress the upstream response with gzip in Kong body_filter, the response HTTP header content-length was set to uncompress response content length in header_filter . So kong tells the downstream client HTTP body length bigger than the real content that kong returns. it will let the HTTP client wait some time for data that doesn't exist. So I choose to clear content-length header in the header filter to tell nginx using the chunk transfer encoding method to process the body data.

before:
image

After:
image

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix AG-182

@fffonion fffonion force-pushed the fix-header-filter-processing-content-len branch from fc9e87c to ed0f151 Compare December 2, 2024 08:59
@fffonion fffonion merged commit 2cdafdd into master Dec 2, 2024
26 checks passed
@fffonion fffonion deleted the fix-header-filter-processing-content-len branch December 2, 2024 11:14
@team-gateway-bot
Copy link
Collaborator

@team-gateway-bot
Copy link
Collaborator

Successfully created cherry-pick PR for master:

@kikito
Copy link
Member

kikito commented Dec 3, 2024

cherrypick @ https://github.com/Kong/kong-ee/pull/10925

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

Successfully merging this pull request may close these issues.

7 participants