Don't copy URI path & query to gateway request #46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When requests to the relay include a path & query, previously this would be copied to the request sent to the gateway.
This behavior did not match the specified behavior in RFC 9458, where the relay and gateway resource are related by a fixed 1:1 mapping, whereas copying the path is a family of 1:1 mappings between relay resources and gateway resources.
Less pedantic behavior could arguably simply ignore any extraneous path or query elements in the request URI, but based on the logic that any deployment relying on the existing behavior would be incompatible with the existing directory implementation, this more conservative path was chosen.
This was only tested manually by temporarily modifying the ohttp_req test helper to ensure it fails (for both the request matching and the explicit treatment of req.uri().path_and_query()), in order to avoid modifying it with additional long lived complexity to allow overriding the path. The rationale is that in the near term protocol opt-in by directories will give meaning to path components of directory requests, and the modified behavior fails closed.