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(http-proxy): remove disallowed headers when response headers contains trailer #830

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ziboilihua
Copy link

@ziboilihua ziboilihua commented Sep 22, 2022

Description

Process will exit when proxy response header both contains trailer and disallow headers eg.content-length

Motivation and Context

How has this been tested?

I've created e2e test for this case, and all unit tests passed.

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 not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

…ins trailer

Signed-off-by: zibo <ziboilihua@gmail.com>
@@ -12,6 +12,19 @@ type Interceptor = (
res: http.ServerResponse
) => Promise<Buffer | string>;

const TrailerDisallowHeaders: string[] = [
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a link to verify the completeness of these headers?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: zibo <ziboilihua@gmail.com>
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.

None yet

2 participants