-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for url dispatching using unquoted path.
It's necessary when trying to call the server with quoted /. Indeed with example: ``` app = Application(loop=loop) app.router.add_route('GET', '/{route}', handler) ``` Following query will fail with a 404 status: ``` curl -I http://127.0.0.1:8080/route%2Fslash HTTP/1.1 404 Not Found ... ``` Because ```%2F``` is unquoted and the path tested for match is then ```route/slash```. The proposed solution is to allow a ```unquoted_path``` argument in UrlDispatcher: ``` app = Application(loop=loop) app.router.add_route('GET', '/{route}', handler) ``` And now the request match the route: ``` curl -I http://127.0.0.1:8080/route%2Fslash HTTP/1.1 200 OK ... ```
- Loading branch information
FELD Boris
committed
Jun 20, 2015
1 parent
24d9c38
commit b59af6e
Showing
6 changed files
with
51 additions
and
3 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
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