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 query param names in case-sensitive way with njs-0.7.6 in NGINX 1.23.1 image. #220

Merged
merged 2 commits into from
Sep 7, 2022

Conversation

pleshakov
Copy link
Contributor

Proposed changes

(1)
NGINX 1.23.1 image includes njs-0.7.6, which now allows handling query
param names in case-sensitive manner. For example, in the query string
'?test=1&TEST=2', 'test' and 'TEST' are now different params.

This makes NGINX Kubernetes Gateway compliant with the Gateway API spec.

(2)
Updating NGINX to 1.23.1 image brought changes with njs-0.7.6, which now
supports examining all values of a query param.

The commit updates njs code for matching query params so that in the case
of multiple values of a query param, the first value is used. This is
consistent with the previous behavior and the Gateway API spec.

Additionally, the unit tests for 'paramsMatch' were fixed and updated
to cover multiple param values and different case of a param name.

This PR supersedes #178

@pleshakov pleshakov added the enhancement New feature or request label Sep 1, 2022
@pleshakov pleshakov mentioned this pull request Sep 1, 2022
@pleshakov pleshakov added the dependencies Pull requests that update a dependency file label Sep 1, 2022
@pleshakov pleshakov force-pushed the feat/case-sensitive-query-param-names branch from 3c85b71 to ae0b3c5 Compare September 1, 2022 21:12
lucacome and others added 2 commits September 7, 2022 13:43
…X 1.23.1 image.

NGINX 1.23.1 image includes njs-0.7.6, which now allows handling query
param names in case-sensitive manner. For example, in the query string
'?test=1&TEST=2', 'test' and 'TEST' are now different params.

This makes NGINX Kubernetes Gateway compliant with the Gateway API spec.
Updating NGINX to 1.23.1 image brought changes with njs-0.7.6, which now
supports examining all values of a query param.

The commit updates njs code for matching query params so that in the case
of multiple values of a query param, the first value is used. This is
consistent with the previous behavior and the Gateway API spec.

Additionally, the unit tests for 'paramsMatch' were fixed and updated
to cover multiple param values and different case of a param name.
@pleshakov pleshakov force-pushed the feat/case-sensitive-query-param-names branch from c2368bd to 9251cbc Compare September 7, 2022 18:44
@pleshakov pleshakov merged commit bda13ef into main Sep 7, 2022
@pleshakov pleshakov deleted the feat/case-sensitive-query-param-names branch September 7, 2022 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants