Skip to content
Myr

on redirect pass URL as bytes. Fixes: #1887

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

authored by Konstantinos Koukopoulos · committed by Konstantinos Koukopoulos · parent b6e1679 · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:requests/sessions.py+2 added-2 removed
15 unmodified lines
16from .cookies import (17 cookiejar_from_dict, extract_cookies_to_jar, RequestsCookieJar, merge_cookies)18from .models import Request, PreparedRequest19from .hooks import default_hooks, dispatch_hook20from .utils import to_key_val_list, default_headers20from .utils import to_key_val_list, default_headers, to_native_string21from .exceptions import TooManyRedirects, InvalidSchema22from .structures import CaseInsensitiveDict2324from .adapters import HTTPAdapter
95 unmodified lines
120 url = urljoin(resp.url, requote_uri(url))121 else:122 url = requote_uri(url)123124 prepared_request.url = url124 prepared_request.url = to_native_string(url)125126 # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4127 if (resp.status_code == codes.see_other and128 method != 'HEAD'):
425 unmodified lines