summaryrefslogtreecommitdiffstats
path: root/Lib/httplib.py
Commit message (Collapse)AuthorAgeFilesLines
* oops - export InvalidURL in __all__Skip Montanaro2002-03-241-1/+1
|
* add InvalidURL exception - raised if port is given but empty or non-numericSkip Montanaro2002-03-241-1/+7
|
* [Bug #531616] Make HTTPS work again by adding a sendall method to theAndrew M. Kuchling2002-03-181-0/+3
| | | | | | | | | | 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.
* Fix SF bug 525520.Jeremy Hylton2002-03-091-20/+34
| | | | | Don't automatically add a Host: header if the headers passed to request() already has a Host key.
* SF bug report #405939: wrong Host header with proxyJeremy Hylton2002-03-081-3/+21
| | | | | | | | | | | | | | | 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.
* The Grande 'sendall()' patch, copied from release21-maint. Fixes #516715.Martin v. Löwis2002-02-161-1/+1
| | | | | Replaces calls to socket.send() (which isn't guaranteed to send all data) with the new socket.sendall() method.
* SF #515011, cleanup: remove "or 0" conditionNeal Norwitz2002-02-111-2/+1
|
* Somebody checked in a version of httplib that doesn't even compile --Tim Peters2001-10-111-1/+1
| | | | SyntaxError. Fix it.
* Fix for SF buf #458835Jeremy Hylton2001-10-111-3/+14
| | | | | | | | | | | | | | | | | 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.
* Only close sockets if they have been created. Reported by Blake Winton.Martin v. Löwis2001-10-071-1/+2
|
* Resolve patch #449367.Greg Stein2001-08-181-15/+26
| | | | | | | | | | | 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.
* Initialize msg to avoid unbound locals.Martin v. Löwis2001-07-311-0/+1
|
* Untabify IPv6 changes.Martin v. Löwis2001-07-261-16/+16
|
* Patch #401196: Use getaddrinfo and AF_INET6 in TCP servers and clients.Martin v. Löwis2001-07-241-4/+16
|
* more public symbols for __all__Skip Montanaro2001-06-011-1/+6
|
* SF patch #405845 by Martin von LöwisJeremy Hylton2001-04-131-1/+7
| | | | | | Fixes SF bug #405427. If an http response has a bogus return code, e.g. 400.100, raise BadStatusLine.
* An ssl-wrapped socket now returns '' on EOF, just like a regularJeremy Hylton2001-02-011-3/+7
| | | | | | socket -- as suggested by Clarence Gardner. Fix httplib to comply with the new ssl-socket interface.
* added a few more __all__ listsSkip Montanaro2001-01-231-0/+2
| | | | fixed typo in ihooks docstring
* Revert a change I accidentally checked in together with Ping'sGuido van Rossum2001-01-151-4/+1
| | | | "smallest patch ever".
* Whitespace normalization.Tim Peters2001-01-141-17/+17
|
* SF Patch #103232 by dougfort: Preserve Nonstandard Port Number in HostGuido van Rossum2001-01-141-1/+6
| | | | | | | | | | 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.
* No text file relying on significant trailing whitespace is robust underTim Peters2001-01-131-16/+16
| | | | modification. Removed the need for that.
* SF Patch #103225 by Ping: httplib: smallest Python patch everGuido van Rossum2001-01-131-2/+5
| | | | | | | The ASCII-art diagram at the top of httplib contains a backslash at the end of a line, which causes Python to remove the newline. This one-character patch adds a space after the backslash so it will appear at the end of the line in the docstring as intended.
* Get rid of string functions.Guido van Rossum2000-12-151-14/+12
| | | | | There should really be a little tool to help with this -- it's rather tedious and there are lots of special cases!
* Hoepeful fix for SF bug #123924: Windows - using OpenSSL, problem withGuido van Rossum2000-12-111-1/+4
| | | | | | | | | | | | | | | | socket in httplib.py. The bug reports that on Windows, you must pass sock._sock to the socket.ssl() call. But on Unix, you must pass sock itself. (sock is a wrapper on Windows but not on Unix; the ssl() call wants the real socket object, not the wrapper.) So we see if sock has an _sock attribute and if so, extract it. Unfortunately, the submitter of the bug didn't confirm that this patch works, so I'll just have to believe it (can't test it myself since I don't have OpenSSL on Windows set up, and that's a nontrivial thing I believe).
* If the status line is invalid, assume it is a pre-1.0 response. TheJeremy Hylton2000-10-121-3/+10
| | | | msg/headers are empty and the entire response is treated as the body.
* Indent _connection_class so that it becomes HTTPS._connection_class.Martin v. Löwis2000-09-211-1/+1
|
* Do not close socket when a Content-Length is 0. This make theJeremy Hylton2000-09-181-15/+20
| | | | | | | interface consistent: The client is responsible for closing the socket, regardless of the amount of data received. Restore suport for set_debuglevel call.
* cope with weird Content-Length values returned from servers byJeremy Hylton2000-09-141-1/+4
| | | | ignoring them; e.g. Zope sometimes returns 13497L
* add docstring explaining makefile limitationJeremy Hylton2000-08-231-1/+11
| | | | fix support for passing http version to connect in HTTP
* add support for HTTPSJeremy Hylton2000-08-011-16/+27
| | | | | | | Modify HTTP to use delegation instead of inheritance. The _connection_class attribute of the class defines what class to delegate to. The HTTPS class is a subclass of HTTP that redefines _connection_class.
* no changes other than indentation level (now 4) and comment reflow.Greg Stein2000-07-181-573/+577
| | | | use "cvs diff -b" to verify.
* initial commit of a new HTTP library, supporting HTTP/1.1 and persistentGreg Stein2000-06-261-228/+734
| | | | connections.
* Add call to putheader('Host', 'www.python.org') to the example.Guido van Rossum2000-05-191-0/+1
|
* Fredrik Lundh:Guido van Rossum2000-03-281-2/+2
| | | | | This fixes a bunch of socket.connect(host, post) calls. Note that I haven't tested all modules -- I don't have enough servers here...
* Untabify to pass the -tt test.Fred Drake2000-02-101-15/+15
|
* OpenSSL support. This is based on patches for a version of SSLeay byGuido van Rossum1999-12-071-13/+92
| | | | | | Brian E Gallew, which were improved and adapted to OpenSSL 0.9.4 by Laszlo Kovacs of HP. Both have kindly given permission to include the patches in the Python distribution. Final formatting by GvR.
* Patch by Tim O'Malley for servers that send a response looking just likeGuido van Rossum1998-01-191-2/+6
| | | | | | HTTP/1.x 200 instead of HTTP/1.x 200 OK
* Doc strings by Mitch Chapman (with a little reformatting).Guido van Rossum1997-12-091-118/+174
| | | | Also reformatted the whole module with 4 spaces and no tabs.
* Two changes:Guido van Rossum1997-08-111-14/+13
| | | | | | | | | (1) No longer close self.sock; close it on close(). (Guido) (2) Don't use regular expressions for what can be done simply with string.split() -- regex is thread unsafe. (Jeremy) (3) Delete unused imports. (Jeremy)
* In the HTTP reply header, be more accepting in the HTTP version.Guido van Rossum1996-12-101-2/+2
|
* Changed makefile() args from r/w to rb/wb, for non-unix compatability.Jack Jansen1996-02-141-1/+1
|
* actualized example/reference, fix bug w/ nonnumeric portGuido van Rossum1995-09-301-8/+9
|
* fixed the test programGuido van Rossum1995-09-071-3/+6
|
* use mimetools; add close()Guido van Rossum1995-08-071-2/+8
|
* discard endrequest(); minor stuff; rfc822 no seek flagGuido van Rossum1995-06-221-6/+4
|
* Changes to use default argument values where possibleGuido van Rossum1994-05-061-8/+4
|
* Fix bug with somtimes uninitialized portGuido van Rossum1994-02-221-1/+2
|
* Towards a standard access mechanism for URLs.Guido van Rossum1994-02-211-0/+129