Commit Graph

124 Commits

Author SHA1 Message Date
Jeremy Hylton 110941a4ba If the status line is invalid, assume it is a pre-1.0 response. The
msg/headers are empty and the entire response is treated as the body.
2000-10-12 19:58:36 +00:00
Martin v. Löwis d7bf974af4 Indent _connection_class so that it becomes HTTPS._connection_class. 2000-09-21 22:09:47 +00:00
Jeremy Hylton 30f867423a Do not close socket when a Content-Length is 0. This make the
interface consistent: The client is responsible for closing the
socket, regardless of the amount of data received.

Restore suport for set_debuglevel call.
2000-09-18 22:50:38 +00:00
Jeremy Hylton 30a818196e cope with weird Content-Length values returned from servers by
ignoring them; e.g. Zope sometimes returns 13497L
2000-09-14 20:34:27 +00:00
Jeremy Hylton 4d746fca3d add docstring explaining makefile limitation
fix support for passing http version to connect in HTTP
2000-08-23 20:34:17 +00:00
Jeremy Hylton 29b8d5acd0 add support for HTTPS
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.
2000-08-01 17:33:32 +00:00
Greg Stein dd6eefb348 no changes other than indentation level (now 4) and comment reflow.
use "cvs diff -b" to verify.
2000-07-18 09:09:48 +00:00
Greg Stein 5e0fa4065f initial commit of a new HTTP library, supporting HTTP/1.1 and persistent
connections.
2000-06-26 08:28:01 +00:00
Guido van Rossum 974f70d97b Add call to putheader('Host', 'www.python.org') to the example. 2000-05-19 23:06:45 +00:00
Guido van Rossum 93a7c0fe6b Fredrik Lundh:
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...
2000-03-28 21:45:46 +00:00
Fred Drake 13a2c279c5 Untabify to pass the -tt test. 2000-02-10 17:17:14 +00:00
Guido van Rossum 09c8b6c3e4 OpenSSL support. This is based on patches for a version of SSLeay by
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.
1999-12-07 21:37:17 +00:00
Guido van Rossum 29c4688659 Patch by Tim O'Malley for servers that send a response looking just like
HTTP/1.x 200
instead of
    HTTP/1.x 200 OK
1998-01-19 22:25:24 +00:00
Guido van Rossum 41999c164e Doc strings by Mitch Chapman (with a little reformatting).
Also reformatted the whole module with 4 spaces and no tabs.
1997-12-09 00:12:23 +00:00
Guido van Rossum 2567dd6d44 Two changes:
(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)
1997-08-11 21:52:17 +00:00
Guido van Rossum 8b82baa398 In the HTTP reply header, be more accepting in the HTTP version. 1996-12-10 15:58:22 +00:00
Jack Jansen 2bb57b81f2 Changed makefile() args from r/w to rb/wb, for non-unix compatability. 1996-02-14 16:06:24 +00:00
Guido van Rossum 928fcede65 actualized example/reference, fix bug w/ nonnumeric port 1995-09-30 16:50:46 +00:00
Guido van Rossum a0dfc7ad65 fixed the test program 1995-09-07 19:28:19 +00:00
Guido van Rossum 65ab98c427 use mimetools; add close() 1995-08-07 20:13:02 +00:00
Guido van Rossum 4cdcef7e29 discard endrequest(); minor stuff; rfc822 no seek flag 1995-06-22 18:48:48 +00:00
Guido van Rossum 2922c6dabb Changes to use default argument values where possible 1994-05-06 14:28:19 +00:00
Guido van Rossum 76ca3c17f0 Fix bug with somtimes uninitialized port 1994-02-22 16:06:02 +00:00
Guido van Rossum 23acc9590c Towards a standard access mechanism for URLs. 1994-02-21 16:36:04 +00:00