Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upTest different URL encodings for Cors Check in Fetch #9587
Comments
|
@SimonSapin Is this something we really need to do? |
|
I don’t fully understand what this issue is about. @nikkisquared @asajeffrey, could you clarify? If it is indeed proposing to implement both of two alternative behaviors because a combination of specs seems ambiguous, that’s probably not the right approach. FWIW |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As @asajeffrey pointed out[1], specifications and standards for handling URLs are inconsistent, and it'd be great to verify how they are working for Fetch's Cors Check step, which works on and cross-compares different Origins.
Tests for this would go in fetch.rs inside the tests/unit/net folder. The test for making a CORS filtered response would be the basis for the new tests, by changing the Access Control Allow Origin[2] header to the type Value and giving it a URL string. Request's origin needs to be set to the same URL, otherwise the Cors Check will always fail because of the origin mismatch.
There are at least two encodings that should be tested for this: punycode[3], and percent-encoding (with % signs for representing non-ASCII characters).
[1] #9525 (comment)
[2] http://hyper.rs/hyper/hyper/header/enum.AccessControlAllowOrigin.html
[3] https://www.punycoder.com/