| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
httplib will now raise IncompleteRead and close the connection instead
of raising ValueError.
|
| |
|
|
|
|
|
| |
implements the chunked encoding incorrectly.
Will backport to 2.5.
|
| |
|
|
|
|
|
|
|
| |
it closes itself. When the stream is read in several calls to read(n),
it should behave in the same way if HTTPConnection knows where the end
of the stream is (through self.length). Added a test case for this
behaviour.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Much expanded test suite:
All protocols tested against all other protocols.
All protocols tested with all certificate options.
Tests for bad key and bad cert.
Test of STARTTLS functionality.
Test of RAND_* functions.
* Fixes for threading/malloc bug.
* Issue 1065 fixed:
sslsocket class renamed to SSLSocket.
sslerror class renamed to SSLError.
Function "wrap_socket" now used to wrap an existing socket.
* Issue 1583946 finally fixed:
Support for subjectAltName added.
Subject name now returned as proper DN list of RDNs.
* SSLError exported from socket as "sslerror".
* RAND_* functions properly exported from ssl.py.
* Documentation improved:
Example of how to create a self-signed certificate.
Better indexing.
|
| |
|
|
|
|
| |
classes when they are actually created.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Improve the documentation of the SSL module, with a fuller
explanation of certificate usage, another reference, proper
formatting of this and that.
2) Fix Windows bug in ssl.py, and general bug in sslsocket.close().
Remove some unused code from ssl.py. Allow accept() to be called on
sslsocket sockets.
3) Use try-except-else in import of ssl in socket.py. Deprecate use of
socket.ssl().
4) Remove use of socket.ssl() in every library module, except for
test_socket_ssl.py and test_ssl.py.
|
| |
|
|
|
|
|
| |
socket.create_connection function. Also added a small
test for this, and updated NEWS file.
|
| |
|
|
|
|
|
| |
connection with an optional timeout, and modified httplib.py to
use this function in HTTPConnection. Applies patch 1676823.
|
|
|
|
| |
Will backport.
|
| |
|
|
|
|
| |
HTTPConnection.request().
|
| |
|
|
|
|
|
| |
Fix httplib.HTTPConnection.getresponse to not close the
socket if it is still needed for the response.
|
|
|
|
| |
if not necessary.
|
| |
|
| |
|
| |
|
|
|
|
| |
If read() returned less than the number of bytes request, the full amount was subtracted from length instead of the actually read amount.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
separates ip address from the port to accommodate ipv6 addresses.
|
| |
|
|
|
|
|
|
| |
Hack httplib to work with broken Akamai proxies.
Make sure that httplib doesn't add extract Accept-Encoding or
Content-Length headers if the client has already set them.
|
|
|
|
|
| |
in HTTP/0.9 due to dissonance of httplib.LineAndFileWrapper and
urllib.addbase.
|
| |
|
| |
|
| |
|
|
|
|
| |
(same as commit of Sun Nov 2 to the release23-maint branch)
|
|
|
|
| |
Backported to 2.3.
|
|
|
|
| |
The obvious way for this assertion to fail is if the LineAndFileWrapper constructor is called when an empty line. Raise a BadStatusError before the call.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In response to "shouldn't the client close the file?", the answer is
"no". The original design behind HTTPConnection is that the client did
not have to worry about it. The response would close itself when you
read the last of the data from it. This closing also dealt with
allowing the connection to perform another request/response (if it was
a persistent connection).
However... the auto-close behavior broke compatibility with the
classic httplib.HTTP class' behavior when a zero-length response body
was present. In that situation, the HTTPResponse object was
auto-closing it since there was no data present, and for an HTTP/1.0
connection-close socket (or an HTTP/0.9 request) connection, that also
ended up closing the socket. When an httplib.HTTP user went to read
the socket... boom. A patch to correct the auto-close (for compat with
old httplib users) was added in rev 1.22.
But for non-zero-length *chunked* bodies, we should keep the
auto-close behavior. The library user is not reading the socket (they
can't cuz of the chunked response we just got done handling), so they
should be immune to the response closing the socket. In fact, I would
like to see (one day) the auto-close restored, and the HTTP subclass
would simply have a flag to disable that behavior (for back-compat
purposes).
|
|
|
|
| |
Fixes #754447.
|
| |
|
|
|
|
| |
Bug fix candidate.
|
| |
|
|
|
|
|
|
| |
Kevin Jacobs found that the code simplification did not
exactly match the semantics of the original. Regression
test cases were requested.
|
|
|
|
|
|
|
| |
* Replaced "while 1" with "while True"
* Rewrote read() and readline() for clarity and speed.
* Replaced variable 'list' with 'hlist'
* Used augmented assignment in two places.
|
| |
|
| |
|
|
|
|
|
| |
The buggy yahoo server was fixed, and the opalgroup test files are
gone.
|
|
|
|
| |
Also, remove unused local variable noted by pychecker.
|