This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent removing trailing slash in request URL (#96)
* Change `isAbsolute` property to `isComplete` The check was not actually whether or not a URL was absolute, but whether it was "complete". For example, "http://foo.com" should have been recognized, although that is not actually what an "absolute url" usually refers to, which is something like "/foo". The name change just increases the clarify of what is being verifyied. * Correctly build full URL from parts The old way of building a URL was too brittle and didn't cover a lot of the different cases that could take place, in different combinations of the host, namespace, and segment having or not having slashes included. The new approach implemented here handles the various cases correctly, and ensures that we do not remove a trailing slash if one was provided. Closes #70
- Loading branch information
1 parent
b00eac6
commit bfd0636
Showing
4 changed files
with
142 additions
and
17 deletions.
There are no files selected for viewing
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