Skip to content

Commit 2243316

Browse files
committed
Update trivial mentions to RFC 2616.
1 parent 7022830 commit 2243316

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/user/quickstart.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@ We can view the server's response headers using a Python dictionary::
325325
}
326326

327327
The dictionary is special, though: it's made just for HTTP headers. According to
328-
`RFC 2616 <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>`_, HTTP
329-
Headers are case-insensitive.
328+
`RFC 7230 <http://tools.ietf.org/html/rfc7230#section-3.2>`_, HTTP Header names
329+
are case-insensitive.
330330

331331
So, we can access the headers using any capitalization we want::
332332

requests/sessions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def resolve_redirects(self, resp, req, stream=False, timeout=None,
118118
parsed = urlparse(url)
119119
url = parsed.geturl()
120120

121-
# Facilitate non-RFC2616-compliant 'location' headers
121+
# Facilitate relative 'location' headers, as allowed by RFC 7231.
122122
# (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource')
123123
# Compliant with RFC3986, we percent encode the url.
124124
if not urlparse(url).netloc:
@@ -128,7 +128,7 @@ def resolve_redirects(self, resp, req, stream=False, timeout=None,
128128

129129
prepared_request.url = to_native_string(url)
130130

131-
# http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4
131+
# http://tools.ietf.org/html/rfc7231#section-6.4.4
132132
if (resp.status_code == codes.see_other and
133133
method != 'HEAD'):
134134
method = 'GET'

0 commit comments

Comments
 (0)