Skip to content
Myr

Update trivial mentions to RFC 2616.

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 7022830 · Browse files · 2 files+4 added−4 removed
This commit

State

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

Diff stats

2 files+4 added−4 removed

  • other:+4 added−4 removed

2 files+4 added−4 removed

modified:docs/user/quickstart.rst+2 added-2 removed
323 unmodified lines
324 'content-type': 'application/json'325 }326327The dictionary is special, though: it's made just for HTTP headers. According to328`RFC 2616 <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>`_, HTTP329Headers are case-insensitive.328`RFC 7230 <http://tools.ietf.org/html/rfc7230#section-3.2>`_, HTTP Header names329are case-insensitive.330331So, we can access the headers using any capitalization we want::332333 >>> r.headers['Content-Type']
108 unmodified lines
modified:requests/sessions.py+2 added-2 removed
116 unmodified lines
117 # The scheme should be lower case...118 parsed = urlparse(url)119 url = parsed.geturl()120121 # Facilitate non-RFC2616-compliant 'location' headers121 # Facilitate relative 'location' headers, as allowed by RFC 7231.122 # (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource')123 # Compliant with RFC3986, we percent encode the url.124 if not urlparse(url).netloc:125 url = urljoin(resp.url, requote_uri(url))
1 unmodified line
127 url = requote_uri(url)128129 prepared_request.url = to_native_string(url)130131 # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4131 # http://tools.ietf.org/html/rfc7231#section-6.4.4132 if (resp.status_code == codes.see_other and133 method != 'HEAD'):134 method = 'GET'135
502 unmodified lines