Previously the header was stripped only if the hostname changed, but in
an https -> http redirect that can leak the credentials on the wire
(#4716). Based on with RFC 7235 section 2.2, the header is now stripped
if the "canonical root URL" (scheme+authority) has changed, by checking
scheme, hostname and port.
The documentation for the 'data' parameter of various functions was
inconsistant. The low-level function, used by every convenience API,
internally uses RequestEncodingMixin._encode_params which accepts list
of tuples as well as dictionaries, hence every function taking a data
parameter also accepts a list of tuple.
Keep the documentation short, but provide a link to Request for
details.
* Updated HISTORY.rst.
* Moved version pin for idna to allow recent 2.7 release.
* Updated version warning for urllib3 to allow 1.23.
* Updated metadata dunders in __version__.py.
* Removed Python 2.6 trove classifier.
* Removed Python 2.6 reference from README.rst.
Without it, the cookie policy would get lost while making a request.
That would be invisible to the user if the default cookie policy wasn't
changed, of course.
>>> from requests import post
>>> r = post("https://example.com", files={"file-name": None})
However, when a param value or json field is None they are not included in the request body.
>>> from requests import get
>>> r = get("https://example.com", params={"file-name": None})
>>> r.request.url
This commit makes the beahviour consistent for files.
There was no way to determine what actual names were available outside
of looking at the source code. They were not listed in the documentation
or accessible through the interactive help.
In addition, doing `pydoc requests.status_codes` displayed some pretty
unhelpful information - the utf-8 encoding string was included in the
module name, there was no description, and internal variables used for
initialisation leaked into the module scope:
DATA
code = 511
codes = <lookup 'status_codes'>
title = 'network_authentication'
titles = ('network_authentication_required', 'network_auth', ...
This change prevents the internal variables from leaking, adds a
docstring (which has the side-effect of correcting the module name), and
appends information on the allowed status code names to the docstring
when the module is initialised.
The improved module documentation is then used in the API documentation
to provide another easy reference to the complete list of status codes.
* #4373, fix possible winreg value type difference
* add a test for ProxyOverride and ProxyEnable on win32
* add tests for winreg key ProxyEnable with two possible types
* fixing AppVeyor failures