-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update integration test to serve Janus-Janus test out of /dap/ prefix. This exercises a current bug in Janus where it can't interoperate with an aggregator that is not serving out of the "base" of its domain (i.e. "https://example.com/" will work, "https://example.com/dap/" will not). The test currently fails; the following commit will fix this bug & make the test pass. This was missed because all existing tests of sufficient complexity to potentially exercise a bug in aggregator endpoint handling were testing against endpoints set to the base of a domain. * Task: ensure aggregator endpoints end in a slash. This is required to fix a *different* footgun in URL than the one causing our non-base-domain heartache: if a URL doesn't end in a slash, Url::join will, rather than joining the paths, replace the final path element with the additional path elements. I also update deserialization to go through the constructor -- I believe all constructed Task values now go through the constructor. I don't fix that the aggregator_endpoints field is pub -- hypothetically someone that owns a Task value could mutate the field. We should probably do as other types do & make all fields private with getters created as necessary. * Join relative, rather than relative, URL paths. Janus joined absolute paths to aggregator endpoint URLs in several locations. Url::join treats an absolute path as replacing the existing path. This is not documented [1], nor do any of the documentation's examples show this behavior, but the behavior is demonstrated by [2]. Due to this, Janus would remove any existing path from an aggregator endpoint before sending requests of the affected types, effectively breaking interoperation. [1] https://docs.rs/url/2.2.2/url/struct.Url.html#method.join [2] https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6b80dd9c27d87613afda5e2e440441cd * ClientParameters: ensure aggregator endpoints end in a slash. We do this for the same reason we ensure the aggregator endpoints in a Task end in a slash.
- Loading branch information
Showing
10 changed files
with
138 additions
and
58 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters