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

Document the edge case with repeated query params #1271

Closed
pleshakov opened this issue Jul 19, 2022 · 1 comment · Fixed by #1361
Closed

Document the edge case with repeated query params #1271

pleshakov opened this issue Jul 19, 2022 · 1 comment · Fixed by #1361
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation.
Milestone

Comments

@pleshakov
Copy link
Contributor

What would you like to be added:

Extend the documentation of the Name field of the HTTPQueryParamMatch to describe the edge case of having repeated query params with the same name in the query string of a request. For example, ?a=1&a=2.

Why this is needed:

This is needed to

  • Ensure compatibility across Gateway implementations.
  • To prevent users from relying on implementation-specific behavior which could cause issues when switching implementations.

For the query string ?a=1&a=2, currently, it is not specified whether the following matches match or not:
(1)

queryParams:
- name: a
  value: "1"

(2)

queryParams:
- name: a
  value: "2"

Note that there is no standard that describes how a data plane must handle that case. Envoy, nginx use the first value of a param.
See also #1269

As discussed in the community meeting on July 18, 2022, in the documentation it makes sense to target the two sides of the Gateway API:

  • The implementers: if the data plane allows, they should match against the first value of a param.
  • The users: users should not route traffic based on repeated query params to guard themselves against potential differences in the Gateway API implementations.

See also the documentation of the repeated headers case https://github.com/kubernetes-sigs/gateway-api/blob/main/apis/v1beta1/httproute_types.go#L370-L371

@robscott robscott added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jul 19, 2022
@robscott robscott added this to the v0.6.0 milestone Jul 19, 2022
@kundan2707
Copy link
Contributor

/kind documentation

@k8s-ci-robot k8s-ci-robot added the kind/documentation Categorizes issue or PR as related to documentation. label Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants