Skip to content
Myr

Throw InvalidURL not UnicodeError on bad label.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Cory Benfield · committed by Cory Benfield · parent e08b853 · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:requests/models.py+4 added-1 removed
411 unmodified lines
412413 if not scheme in SCHEMAS:414 raise InvalidSchema("Invalid scheme %r" % scheme)415416 try:416 netloc = netloc.encode('idna').decode('utf-8')417 netloc = netloc.encode('idna').decode('utf-8')418 except UnicodeError:419 raise InvalidURL('URL has an invalid label.')420421 if not path:422 path = '/'423
462 unmodified lines