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

Handle repeated headers #133

Merged
merged 1 commit into from
Jun 30, 2022
Merged

Conversation

kate-osborn
Copy link
Contributor

Proposed changes

If an HTTPHeaderMatch contains entries with equivalent header names, we will only configure the first entry. We will ignore all other entries with that name. Header names are case-insensitive, so "Foo" is equivalent to "foo".

If an HTTP request has repeated headers, nginx will merge the values into a comma-delimited string.

For example, -H "foo:bar" -H "foo:baz" becomes {"foo":"bar,baz"} in the headersIn object. In this case, a request satisfies the header match {"foo":"bar"} if one of the values specified in the request header "foo" is "bar".

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

If an HTTPHeaderMatch contains entries with equivalent header names, we will only configure
the first entry. We will ignore all other entries with that name. Header names are
case-insensitive, so "Foo" is equivalent to "foo".

If an HTTP request has repeated headers, nginx will merge the values into a comma delimited string.
For example, -H "foo:bar" -H "foo:baz" becomes {"foo":"bar,baz"} in the headersIn object.
In this case, a request satisfies the header match {"foo":"bar"} if one of the values specified
in the request header "foo" is "bar".
@kate-osborn kate-osborn merged commit 6279e65 into nginxinc:main Jun 30, 2022
@pammecrandall pammecrandall added the enhancement New feature or request label Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants