summaryrefslogtreecommitdiffstats
path: root/Doc/library/http.client.rst
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31945: Configurable blocksize in HTTP(S)Connection (#4279)Nir Soffer2017-11-061-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | blocksize was hardcoded to 8192, preventing efficient upload when using file-like body. Add blocksize argument to __init__, so users can configure the blocksize to fit their needs. I tested this uploading data from /dev/zero to a web server dropping the received data, to test the overhead of the HTTPConnection.send() with a file-like object. Here is an example 10g upload with the default buffer size (8192): $ time ~/src/cpython/release/python upload-httplib.py 10 https://localhost:8000/ Uploaded 10.00g in 17.53 seconds (584.00m/s) real 0m17.574s user 0m8.887s sys 0m5.971s Same with 512k blocksize: $ time ~/src/cpython/release/python upload-httplib.py 10 https://localhost:8000/ Uploaded 10.00g in 6.60 seconds (1551.15m/s) real 0m6.641s user 0m3.426s sys 0m2.162s In real world usage the difference will be smaller, depending on the local and remote storage and the network. See https://github.com/nirs/http-bench for more info.
* bpo-30144: Import collections ABC from collections.abc rather than ↵Serhiy Storchaka2017-04-241-1/+1
| | | | collections. (#1263)
* Merge from 3.5Andrew Kuchling2016-11-091-1/+1
|\
| * Use http instead of https, due to certificate errorAndrew Kuchling2016-11-091-1/+1
| |
* | Merge from 3.5Andrew Kuchling2016-11-091-1/+1
|\ \ | |/
| * Update URL for requests documentation after IRC requestAndrew Kuchling2016-11-091-1/+1
| |
* | Issue #28022: Deprecate ssl-related arguments in favor of SSLContext.Christian Heimes2016-09-101-7/+11
| | | | | | | | | | | | | | The deprecation include manual creation of SSLSocket and certfile/keyfile (or similar) in ftplib, httplib, imaplib, smtplib, poplib and urllib. ssl.wrap_socket() is not marked as deprecated yet.
* | [merge from 3.5] - Issue28010 - Make http.client.HTTPConnection.putrequestSenthil Kumaran2016-09-081-15/+9
|\ \ | |/ | | | | documentation consistent with the code.
| * Issue28010 - Make http.client.HTTPConnection.putrequest documentation ↵Senthil Kumaran2016-09-081-15/+9
| | | | | | | | consistent with the code.
* | Issue #12319: Always send file request bodies using chunked encodingMartin Panter2016-08-271-16/+15
| | | | | | | | | | | | | | The previous attempt to determine the file’s Content-Length gave a false positive for pipes on Windows. Also, drop the special case for sending zero-length iterable bodies.
* | Issue #12319: Support for chunked encoding of HTTP request bodiesMartin Panter2016-08-241-28/+70
|/ | | | | | | | | | | | | | | When the body object is a file, its size is no longer determined with fstat(), since that can report the wrong result (e.g. reading from a pipe). Instead, determine the size using seek(), or fall back to chunked encoding for unseekable files. Also, change the logic for detecting text files to check for TextIOBase inheritance, rather than inspecting the “mode” attribute, which may not exist (e.g. BytesIO and StringIO). The Content-Length for text files is no longer determined ahead of time, because the original logic could have been wrong depending on the codec and newline translation settings. Patch by Demian Brecht and Rolf Krahl, with a few tweaks by me.
* Correct misspellings of ISO-8859Martin Panter2016-08-101-2/+2
|
* Issue #22558: Add remaining doc links to source code for Python-coded modules.Terry Jan Reedy2016-06-111-2/+1
| | | | | Reformat header above separator line (added if missing) to a common format. Patch by Yoni Lavi.
* Issue #26553: Capitalization of HTTP, HTTPS, FTP, and URLMartin Panter2016-05-281-1/+1
| | | | Patch by Anish Shah and Aatish Neupane.
* Issue #23921: Standardized documentation whitespace formatting.Serhiy Storchaka2016-05-101-1/+1
| | | | Original patch by James Edwards.
* Issue #26499: Fixes to HTTPResponse.readline() and read1(), by Silent GhostMartin Panter2016-03-171-0/+4
|
* Closes #25910: fix dead and permanently redirected links in the docs. Thanks ↵Georg Brandl2016-02-261-1/+1
| | | | to SilentGhost for the patch.
* merge 3.4 (#24118)Benjamin Peterson2015-05-031-6/+6
|\
| * update example, since python.org is HTTPS-only now (closes #24118)Benjamin Peterson2015-05-031-6/+6
| |
* | merge 3.4 (#23989)Benjamin Peterson2015-04-201-0/+5
|\ \ | |/
| * recommend requests library (closes #23989)Benjamin Peterson2015-04-201-0/+5
| | | | | | | | Patch from Van Lindberg
* | #3566: Clean up handling of remote server disconnects.R David Murray2015-04-051-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+23
|\ \ | |/
| * #23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None.R David Murray2015-03-221-13/+23
| | | | | | | | | | | | | | | | 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 #23439: Add missing entries to http.client.__all__.Berker Peksag2015-02-201-0/+6
|\ \ | |/ | | | | | | | | | | 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-0/+6
| | | | | | | | | | | | | | 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 #20898: Add a "HTTP status codes" section to avoid duplication in HTTP ↵Berker Peksag2015-01-201-209/+3
|/ | | | | | | | | docs. This commit also removes a couple of non-standard status codes. They were added as part of edf669b13482, so there is no backwards compatibility issue. Patch by Demian Brecht.
* fix reference by adding module nameBenjamin Peterson2014-12-071-1/+1
|
* HTTPSConnection: prefer the context's check_hostname attribute over the ↵Benjamin Peterson2014-12-071-8/+3
| | | | constructor parameter (#22959)
* PEP 476: enable HTTPS certificate verification by default (#22417)Benjamin Peterson2014-11-031-6/+6
| | | | Patch by Alex Gaynor with some modifications by me.
* Correct the URL in the http.client example. Noted by Evens Fortuné. Closes ↵Senthil Kumaran2014-04-171-1/+1
| | | | #21229
* Issue #20913: improve the SSL security considerations to first advocate ↵Antoine Pitrou2014-03-221-17/+21
| | | | using create_default_context().
* merge 3.3 (#11448)Benjamin Peterson2014-03-161-4/+18
|\
| * improve set_tunnel docs (closes #11448)Benjamin Peterson2014-03-161-4/+18
| | | | | | | | Patch by Ryan Kelly, karl, and Nikolaus Rath.
* | whatsnew: deprecation of HTTPConnection's strict parameter.R David Murray2014-01-031-6/+6
| |
* | Issue #19795: Improved markup of True/False constants.Serhiy Storchaka2013-11-291-1/+1
|\ \ | |/
| * Issue #19795: Improved markup of True/False constants.Serhiy Storchaka2013-11-291-1/+1
| |
* | merge with 3.3Georg Brandl2013-10-271-1/+1
|\ \ | |/
| * Issue #16037: HTTPMessage.readheaders() raises an HTTPException when more thanGeorg Brandl2013-10-271-1/+1
| | | | | | | | 100 headers are read. Adapted from patch by Jyrki Pulliainen.
* | merge with 3.3Georg Brandl2013-10-061-1/+1
|\ \ | |/
| * Fix minor bug in httplib example. Found by Alex MacAulay on docs@.Georg Brandl2013-10-061-1/+1
| |
* | #17460 - merge from 3.3Senthil Kumaran2013-03-191-0/+12
|\ \ | |/
| * #17460 - merge from 3.2Senthil Kumaran2013-03-191-3/+3
| |\
| | * #17460 - Adding relevant warning messages regarding strict removal in docsSenthil Kumaran2013-03-191-3/+3
| | |
* | | #17460: Remove the strict argument of HTTPConnection and removing theSenthil Kumaran2013-03-181-15/+3
|/ / | | | | | | DeprecationWarning being issued from 3.2 onwards.
* | #17307 - merge from 3.2Senthil Kumaran2013-03-131-0/+18
|\ \ | |/
| * #17307 - Example of HTTP PUT Request using http.clientSenthil Kumaran2013-03-131-0/+16
| |
* | #15831: merge with 3.2Ezio Melotti2012-09-141-2/+6
|\ \ | |/
| * #15831: document multiple signatures on different lines. Patch by Chris ↵Ezio Melotti2012-09-141-2/+6
| | | | | | | | Jerdonek.
* | Avoid useless indentation.Georg Brandl2012-05-211-2/+2
| |