[Python-bugs-list] [ python-Bugs-457100 ] httplib GET example should use host head

noreply@sourceforge.net noreply@sourceforge.net
Sat, 01 Sep 2001 11:03:30 -0700


Bugs item #457100, was opened at 2001-08-30 21:31
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=457100&group_id=5470

Category: Documentation
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: httplib GET example should use host head

Initial Comment:
the POST example in httplib docs does use
a host: header, but the GET one does not.
people should probably always use a host header
these days as name-based virtual hosts are very
common, copying the example in the documentation
as is is likely to give surprises.

  -- erno@iki.fi

----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-01 11:03

Message:
Logged In: YES 
user_id=6380

The HTTPConnection class already does this, but only for
HTTP/1.1. I think that's good enough. Read the comments in
putrequest().

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-08-31 19:36

Message:
Logged In: YES 
user_id=3066

Agreed; fixed in Doc/lib/libhttplib.tex revision 1.24.

In fact, I wouldn't mind httplib adding it automatically if
it hasn't already been set when endheaders() is called if
the HTTP instance was created with a non-IP value for the
hostname.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=457100&group_id=5470