mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
merge from 3.3
#17403: urllib.parse.robotparser normalizes the urls before adding to ruleline. This helps in handling certain types invalid urls in a conservative manner. Patch contributed by Mher Movsisyan.
This commit is contained in:
commit
6b3026ce72
3 changed files with 17 additions and 0 deletions
|
@ -157,6 +157,7 @@ class RuleLine:
|
|||
if path == '' and not allowance:
|
||||
# an empty value means allow all
|
||||
allowance = True
|
||||
path = urllib.parse.urlunparse(urllib.parse.urlparse(path))
|
||||
self.path = urllib.parse.quote(path)
|
||||
self.allowance = allowance
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue