summaryrefslogtreecommitdiff
path: root/Lib/http/client.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.5] bpo-38216, bpo-36274: Allow subclasses to separately override ↵Jason R. Coombs2019-10-081-11/+21
| | | | | | validation and encoding behavior (GH-16448) (#16475) * [3.5] bpo-38216, bpo-36274: Allow subclasses to separately override validation and encoding behavior (GH-16448)
* bpo-30458: Disallow control chars in http URLs. (GH-12755) (#13207)Miro Hrončok2019-07-141-0/+16
| | | | | | | | | | Disallow control chars in http URLs in urllib.urlopen. This addresses a potential security problem for applications that do not sanity check their URLs where http request headers could be injected. Disable https related urllib tests on a build without ssl (GH-13032) These tests require an SSL enabled build. Skip these tests when python is built without SSL to fix test failures. Use http.client.InvalidURL instead of ValueError as the new error case's exception. (GH-13044) Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
* Issue28010 - Make http.client.HTTPConnection.putrequest documentation ↵Senthil Kumaran2016-09-081-1/+2
| | | | consistent with the code.
* Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Martin Panter2016-09-071-1/+1
|
* Fix typos in documentation and commentsMartin Panter2016-04-051-1/+1
|
* Issue #26499: Fixes to HTTPResponse.readline() and read1(), by Silent GhostMartin Panter2016-03-171-0/+8
|
* Issue #26045: Add UTF-8 suggestion to error in http.clientMartin Panter2016-02-091-1/+16
| | | | Based on patch by Guido van Rossum.
* Issue #23865: close() methods in multiple modules now are idempotent and moreSerhiy Storchaka2015-04-101-9/+15
|\ | | | | | | | | robust at shutdown. If needs to release multiple resources, they are released even if errors are occured.
| * Issue #23865: close() methods in multiple modules now are idempotent and moreSerhiy Storchaka2015-04-101-9/+15
| | | | | | | | | | robust at shutdown. If needs to release multiple resources, they are released even if errors are occured.
* | #3566: Clean up handling of remote server disconnects.R David Murray2015-04-051-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset does two things: introduces a new RemoteDisconnected exception (that subclasses ConnectionResetError and BadStatusLine) so that a remote server disconnection can be detected by client code (and provides a better error message for debugging purposes), and ensures that the client socket is closed if a ConnectionError happens, so that the automatic re-connection code can work if the application handles the error and continues on. Tests are added that confirm that a connection is re-used or not re-used as appropriate to the various combinations of protocol version and headers. Patch by Martin Panter, reviewed by Demian Brecht. (Tweaked only slightly by me.)
* | Merge: #23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None.R David Murray2015-03-221-13/+24
|\ \ | |/
| * #23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None.R David Murray2015-03-221-13/+24
| | | | | | | | | | | | | | | | Some http servers will reject PUT, POST, and PATCH requests if they do not have a Content-Length header. Patch by James Rutherford, with additional cleaning up of the 'request' documentation by me.
* | Issue #22928: Disabled HTTP header injections in http.client.Serhiy Storchaka2015-03-121-0/+37
|\ \ | |/ | | | | Original patch by Demian Brecht.
| * Issue #22928: Disabled HTTP header injections in http.client.Serhiy Storchaka2015-03-121-0/+37
| | | | | | | | Original patch by Demian Brecht.
* | Issue #23439: Add missing entries to http.client.__all__.Berker Peksag2015-02-201-1/+3
|\ \ | |/ | | | | | | | | | | Also, document the LineTooLong exception since it can be raised by the members of public API (e.g. http.client.HTTPResponse). Patch by Martin Panter.
| * Issue #23439: Add missing entries to http.client.__all__.Berker Peksag2015-02-201-1/+3
| | | | | | | | | | | | | | Also, document the LineTooLong exception since it can be raised by the members of public API (e.g. http.client.HTTPResponse). Patch by Martin Panter.
* | Issue #13128: Print response headers for CONNECT requests when debuglevel > 0.Berker Peksag2015-02-031-0/+3
| | | | | | | | Patch by Demian Brecht.
* | http.client: disable Nagle's algorithm (closes #23302)Benjamin Peterson2015-01-231-21/+4
| | | | | | | | Patch by Demian Brecht.
* | Issue #21793: Added http.HTTPStatus enums (i.e. HTTPStatus.OK,Serhiy Storchaka2014-12-231-115/+7
| | | | | | | | HTTPStatus.NOT_FOUND). Patch by Demian Brecht.
* | Issue #22095: Fixed HTTPConnection.set_tunnel with default port. The portSerhiy Storchaka2014-12-121-5/+3
|\ \ | |/ | | | | value in the host header was set to "None". Patch by Demian Brecht.
| * Issue #22095: Fixed HTTPConnection.set_tunnel with default port. The portSerhiy Storchaka2014-12-121-5/+3
| | | | | | | | value in the host header was set to "None". Patch by Demian Brecht.
* | merge 3.4 (#22959)Benjamin Peterson2014-12-071-2/+2
|\ \ | |/
| * HTTPSConnection: prefer the context's check_hostname attribute over the ↵Benjamin Peterson2014-12-071-2/+2
| | | | | | | | constructor parameter (#22959)
* | Issue #21032. Fixed socket leak if HTTPConnection.getresponse() fails.Serhiy Storchaka2014-12-011-10/+14
|\ \ | |/ | | | | Original patch by Martin Panter.
| * Issue #21032. Fixed socket leak if HTTPConnection.getresponse() fails.Serhiy Storchaka2014-12-011-10/+14
| | | | | | | | Original patch by Martin Panter.
* | merge 3.4 (#22921)Benjamin Peterson2014-11-231-2/+1
|\ \ | |/
| * don't require OpenSSL SNI to pass hostname to ssl functions (#22921)Benjamin Peterson2014-11-231-2/+1
| | | | | | | | Patch by Donald Stufft.
* | merge 3.4 (#22417)Benjamin Peterson2014-11-031-1/+1
|\ \ | |/
| * PEP 476: enable HTTPS certificate verification by default (#22417)Benjamin Peterson2014-11-031-1/+1
| | | | | | | | Patch by Alex Gaynor with some modifications by me.
* | Issue #22033: Reprs of most Python implemened classes now contain actualSerhiy Storchaka2014-07-251-1/+2
| | | | | | | | class name instead of hardcoded one.
* | merge from 3.4Senthil Kumaran2014-04-141-24/+49
|\ \ | |/ | | | | | | Issue #7776: Fix ``Host:'' header and reconnection when using http.client.HTTPConnection.set_tunnel() Patch by Nikolaus Rath.
| * Issue #7776: Fix ``Host:'' header and reconnection when using ↵Senthil Kumaran2014-04-141-24/+49
| | | | | | | | | | | | http.client.HTTPConnection.set_tunnel(). Patch by Nikolaus Rath.
* | (Merge 3.4) Issue #20976: pyflakes: Remove unused importsVictor Stinner2014-03-201-1/+0
|\ \ | |/
| * Issue #20976: pyflakes: Remove unused importsVictor Stinner2014-03-201-1/+0
| |
* | Issue #19009Kristján Valur Jónsson2014-03-191-57/+121
|/ | | | Enhance HTTPResponse.readline() performance
* Issue #20007: HTTPResponse.read(0) no more prematurely closes connection.Serhiy Storchaka2013-12-171-1/+1
|\ | | | | | | Original patch by Simon Sapin.
| * Issue #20007: HTTPResponse.read(0) no more prematurely closes connection.Serhiy Storchaka2013-12-171-1/+1
| | | | | | | | Original patch by Simon Sapin.
* | Issue 19509: Don't call match_hostname() twice in http.client.Christian Heimes2013-12-051-6/+6
| |
* | Issue #19735: Implement private function ssl._create_stdlib_context() toChristian Heimes2013-11-231-3/+1
| | | | | | | | | | create SSLContext objects in Python's stdlib module. It provides a single configuration point and makes use of SSLContext.load_default_certs().
* | merge with 3.3Georg Brandl2013-10-271-0/+4
|\ \ | |/
| * Issue #16037: HTTPMessage.readheaders() raises an HTTPException when more thanGeorg Brandl2013-10-271-0/+4
| | | | | | | | 100 headers are read. Adapted from patch by Jyrki Pulliainen.
* | Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)Brett Cannon2013-07-041-1/+1
| |
* | Issue #18200: Update the stdlib (except tests) to useBrett Cannon2013-06-131-1/+1
| | | | | | | | ModuleNotFoundError.
* | Issue #16658: add missing return to HTTPConnection.send().Andrew Svetlov2013-04-121-1/+1
|\ \ | |/ | | | | Patch by Jeff Knupp
| * Issue #16658: add missing return to HTTPConnection.send().Andrew Svetlov2013-04-121-1/+1
| | | | | | | | Patch by Jeff Knupp
* | #17460: Remove the strict argument of HTTPConnection and removing theSenthil Kumaran2013-03-181-16/+7
| | | | | | | | DeprecationWarning being issued from 3.2 onwards.
* | Issue #16723: httplib.HTTPResponse no longer marked closed when the connectionSerhiy Storchaka2013-02-061-17/+21
|\ \ | |/ | | | | is automatically closed.
| * Issue #16723: httplib.HTTPResponse no longer marked closed when the connectionSerhiy Storchaka2013-02-061-17/+21
| |\ | | | | | | | | | is automatically closed.
| | * Issue #16723: httplib.HTTPResponse no longer marked closed when the connectionSerhiy Storchaka2013-02-061-15/+19
| | | | | | | | | | | | is automatically closed.
| | * Simplify code in HTTPResponse.read()Antoine Pitrou2013-02-021-4/+1
| | |