You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do we want to be strict, and disallow and other parameters by default? Should that be a config option? Maybe some syntax for "catch all"? Maybe the default should be strict, disallow other headers. Likely cause issues with some workflows.
More interested in how this works at the router level.
Do we need a matches_request function, that takes a http crate request?
Are we going to need to write a query string parser...
Any prior art in the Rust router space, or other frameworks?
Should this wait until after we handle percent-encoding?
If we can't come up with a satisfying solution, we could just allow dynamic request constraints, e.g. passing in a ref to a http request, gaining access to raw query string.
Need to verify how duplicate query parameters should be handled.
Potential Syntax
# Simple
?name={name} -> fn(&str) # only allow 1 occurance
?name={name:*} -> fn(&[str]) # allow any number of occurances
# Empty Brackets
?names[]={names:*} -> fn(&[str]) # allow any number of occurances
# Brackets
?names[*]={names} -> fn (&[(&str, &str)]) # matches any list of headers?
I like the 'one occurance' or 'many occurances' approach.
Whether it's worthwhile to even attempt to handle this case.
See: OAI/OpenAPI-Specification#1502
See: https://github.com/opencontainers/distribution-spec/blob/main/spec.md#api
Obvious approach would be something like:
list?n=<integer>&last=<tagname>
list?<n>&<last>
Need to figure out how to handle 'array' style query parameters, e.g. created by serde_qs.
Do we want to be strict, and disallow and other parameters by default? Should that be a config option? Maybe some syntax for "catch all"? Maybe the default should be strict, disallow other headers. Likely cause issues with some workflows.
More interested in how this works at the router level.
Do we need a
matches_request
function, that takes a http craterequest
?Are we going to need to write a query string parser...
Any prior art in the Rust router space, or other frameworks?
Should this wait until after we handle percent-encoding?
If we can't come up with a satisfying solution, we could just allow dynamic request constraints, e.g. passing in a ref to a http request, gaining access to raw query string.
Need to verify how duplicate query parameters should be handled.
Potential Syntax
I like the 'one occurance' or 'many occurances' approach.
Whether it's worthwhile to even attempt to handle this case.
See this PHP example:
Maybe we could handle 1 level of arrays, but nested...
Is the answer actually allowing parameters on both the key AND value parts of a header?
The text was updated successfully, but these errors were encountered: