| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
with debuglevel=1 only the header keys got printed. With
this change the header values get printed as well and the single
header entries get '\n' as a separator.
(cherry picked from commit 936f03e7fafc28fd6fdfba11d162c776b89c0167)
Co-authored-by: Marco Strigl <mstrigl@suse.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#4864)
* [3.6] bpo-32297: Few misspellings found in Python source code comments. (GH-4803)
* Fix multiple typos in code comments
* Add spacing in comments (test_logging.py, test_math.py)
* Fix spaces at the beginning of comments in test_logging.py.
(cherry picked from commit 53f7a7c2814fbfd8a29200926601a32fa48bacb3)
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
| |
but not in the expressions. Also, require expressions to begin and end with literal curly braces.
|
| |\
| |
| |
| | |
documentation consistent with the code.
|
| | |
| |
| |
| | |
consistent with the code.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
And most of the tools.
Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and
Martin Panter.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |\ \
| |/ |
|
| | | |
|
| |\ \
| |/ |
|
| | | |
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
Based on patch by Guido van Rossum.
|
| |\ \
| |/
| |
| |
| | |
to ASCII replacements. Removed UTF-8 BOM from Misc/NEWS.
Original patch by Chris Angelico.
|
| |/ |
|
| |\
| |
| |
| |
| | |
robust at shutdown. If needs to release multiple resources, they are released
even if errors are occured.
|
| | |
| |
| |
| |
| | |
robust at shutdown. If needs to release multiple resources, they are released
even if errors are occured.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.)
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |\ \
| |/
| |
| | |
Original patch by Demian Brecht.
|
| | |
| |
| |
| | |
Original patch by Demian Brecht.
|
| |\ \
| |/
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| | |
Patch by Demian Brecht.
|
| | |
| |
| |
| | |
Patch by Demian Brecht.
|
| | |
| |
| |
| | |
HTTPStatus.NOT_FOUND). Patch by Demian Brecht.
|
| |\ \
| |/
| |
| | |
value in the host header was set to "None". Patch by Demian Brecht.
|
| | |
| |
| |
| | |
value in the host header was set to "None". Patch by Demian Brecht.
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
constructor parameter (#22959)
|
| |\ \
| |/
| |
| | |
Original patch by Martin Panter.
|
| | |
| |
| |
| | |
Original patch by Martin Panter.
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
Patch by Donald Stufft.
|
| |\ \
| |/ |
|
| | |
| |
| |
| | |
Patch by Alex Gaynor with some modifications by me.
|
| | |
| |
| |
| | |
class name instead of hardcoded one.
|
| |\ \
| |/
| |
| |
| | |
Issue #7776: Fix ``Host:'' header and reconnection when using http.client.HTTPConnection.set_tunnel()
Patch by Nikolaus Rath.
|
| | |
| |
| |
| |
| |
| | |
http.client.HTTPConnection.set_tunnel().
Patch by Nikolaus Rath.
|
| |\ \
| |/ |
|
| | | |
|
| |/
|
|
| |
Enhance HTTPResponse.readline() performance
|
| |\
| |
| |
| | |
Original patch by Simon Sapin.
|