This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author drurl
Recipients
Date 2005-01-28.18:53:14
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
urllib2 only supports GET or POST HTTP request methods.
 This patch adds support for other methods.

>>> import urllib2
>>> r =
urllib2.Request("http://jdiworks.net/",method="HEAD")
>>> u = urllib2.urlopen(r)
>>> u.read()
''
>>> h = u.headers.getheader
>>> h("content-length")
'4754'
>>> h("accept-ranges")
'bytes'
>>> h("date")
'Fri, 28 Jan 2005 18:39:04 GMT'
>>> h("etag")
'"728074-1292-314c1c40"'
>>> h("last-modified")
'Thu, 01 Jul 2004 23:11:37 GMT'

TODO: fix 3xx redirect with a HEAD
History
Date User Action Args
2007-08-23 15:41:31adminlinkissue1111653 messages
2007-08-23 15:41:31admincreate