Commit Graph

52 Commits

Author SHA1 Message Date
Jeremy Hylton
975472b980 Remove references to pages that don't exist anymore. 2003-01-31 14:07:31 +00:00
Tim Peters
e40add41cc Whitespace normalization. 2002-10-07 01:18:17 +00:00
Michael W. Hudson
ac3fe23b86 Dump trunk version of httplib.py onto branch. 2002-09-25 16:53:17 +00:00
Jeremy Hylton
799e99b1c0 Backport changes.
Change _begin() back to begin().
Fix for SF bug 579107.
Fix for SF bug #432621: httplib: multiple Set-Cookie headers
Fix SF bug #575360
Handle HTTP/0.9 responses.
2002-07-12 14:23:43 +00:00
Jeremy Hylton
5b4f1c1201 Backport various bug fixes from trunk.
The 2.2 maintenace branch is now identical to the trunk through rev
1.53.
2002-07-02 17:19:47 +00:00
Martin v. Löwis
b390f5f73b Patch #500311: Work around for buggy https servers. Fixes #494762. 2002-04-20 07:45:25 +00:00
Michael W. Hudson
d360a0058e backport akuchling's checkin of
revision 1.47 of httplib.py

[Bug #531616] Make HTTPS work again by adding a sendall method to the
FakeSocket class.  Without it, the sendall() call got the method on
the underlying socket object, and that messed up SSL.

Does httplib use other methods of sockets that FakeSocket doesn't support?
Someone should take a look...  (I'll try to give it a once-over.)

2.2.1 bugfix candidate.
2002-03-25 12:24:58 +00:00
Michael W. Hudson
98f5a89385 I *think* this should go in. May be wrong -- please howl in protest
if so.

backport jhylton's checkin of
    revision 1.46 of httplib.py

Fix SF bug 525520.

Don't automatically add a Host: header if the headers passed to
request() already has a Host key.
2002-03-11 10:19:16 +00:00
Michael W. Hudson
7ac030322f backport jhylton's checkin of
revision 1.45 of httplib.py

SF bug report #405939: wrong Host header with proxy

In August, Greg said this looked good, so I'm going ahead with it.

The fix is different from the one in the bug report.  Instead of using
a regular expression to extract the host from the url, I use
urlparse.urlsplit.

Martin commented that the patch doesn't address URLs that have basic
authentication username and password in the header.  I don't see any
code anywhere in httplib that supports this feature, so I'm not going
to address it for this fix.

Bug fix candidate.
2002-03-11 10:06:36 +00:00
Martin v. Löwis
f0c3827c50 The Grande 'sendall()' patch, copied from release21-maint. Fixes #516715.
Replaces calls to socket.send() (which isn't guaranteed to send all data)
with the new socket.sendall() method.
2002-02-16 23:08:25 +00:00
Tim Peters
f3623f310e Somebody checked in a version of httplib that doesn't even compile --
SyntaxError.  Fix it.
2001-10-11 18:15:51 +00:00
Jeremy Hylton
6459c8d067 Fix for SF buf #458835
Try to be systematic about dealing with socket and ssl exceptions in
FakeSocket.makefile().  The previous version of the code caught all
ssl errors and treated them as EOF, even though most of the errors
don't mean EOF.

An SSL error can mean on of three things:

    1. The SSL/TLS connection was closed.
    2. The operation should be retried.
    3. An error occurred.

Also, if a socket error occurred and the error was EINTR, retry the
call.  Otherwise, it was a legitimate error and the caller should
receive the exception.
2001-10-11 17:47:22 +00:00
Martin v. Löwis
322c0d187d Only close sockets if they have been created. Reported by Blake Winton. 2001-10-07 08:53:32 +00:00
Greg Stein
81937a4a12 Resolve patch #449367.
For the HTTPS class (when available), ensure that the x509 certificate data
gets passed through to the HTTPSConnection class. Create a new
HTTPS.__init__ to do this, and refactor the HTTP.__init__ into a new _setup
method for both init's to call.

Note: this is solved differently from the patch, which advocated a new
**x509 parameter on the base HTTPConnection class. But that would open
HTTPConnection to arbitrary (ignored) parameters, so was not as desirable.
2001-08-18 09:20:23 +00:00
Martin v. Löwis
2ad2569c72 Initialize msg to avoid unbound locals. 2001-07-31 08:40:21 +00:00
Martin v. Löwis
4eb5940a4d Untabify IPv6 changes. 2001-07-26 13:37:33 +00:00
Martin v. Löwis
a43c2f845e Patch #401196: Use getaddrinfo and AF_INET6 in TCP servers and clients. 2001-07-24 20:34:08 +00:00
Skip Montanaro
951a8841d1 more public symbols for __all__ 2001-06-01 16:25:38 +00:00
Jeremy Hylton
23d4047790 SF patch #405845 by Martin von Löwis
Fixes SF bug #405427.
If an http response has a bogus return code, e.g. 400.100, raise
BadStatusLine.
2001-04-13 14:57:08 +00:00
Jeremy Hylton
42dd01add5 An ssl-wrapped socket now returns '' on EOF, just like a regular
socket -- as suggested by Clarence Gardner.

Fix httplib to comply with the new ssl-socket interface.
2001-02-01 23:35:20 +00:00
Skip Montanaro
2dd4276559 added a few more __all__ lists
fixed typo in ihooks docstring
2001-01-23 15:35:05 +00:00
Guido van Rossum
fd97a919ff Revert a change I accidentally checked in together with Ping's
"smallest patch ever".
2001-01-15 14:34:20 +00:00
Tim Peters
07e99cb774 Whitespace normalization. 2001-01-14 23:47:14 +00:00
Guido van Rossum
f6922aa435 SF Patch #103232 by dougfort: Preserve Nonstandard Port Number in Host
Header

Dougfort's comments: httplib does not include ':port ' in the HTTP 1.1
'Host:' header.  This causes problems if the server is not listening
on Port 80.  The test case I use is the login to /manage under Zope,
with Zope listening on port 8080. Zope returns a <frameset> with the
<frame> source URLs lacking the :8080.
2001-01-14 21:03:01 +00:00
Tim Peters
5ceadc8cba No text file relying on significant trailing whitespace is robust under
modification.  Removed the need for that.
2001-01-13 19:16:21 +00:00