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.

classification
Title: HEAD/PUT/DELETE support for urllib2.py
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: drurl, loewis
Priority: normal Keywords: patch

Created on 2005-01-28 18:53 by drurl, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg47630 - (view) Author: Terrel Shumway (drurl) Date: 2005-01-28 18:53
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
msg47631 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-01-29 13:37
Logged In: YES 
user_id=21627

There's no uploaded file!  You have to check the
checkbox labeled "Check to Upload & Attach File"
when you upload a file. In addition, even if you
*did* check this checkbox, a bug in SourceForge
prevents attaching a file when *creating* an issue.

Please try again.

(This is a SourceForge annoyance that we can do
nothing about. :-( )
msg47632 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-03-03 23:02
Logged In: YES 
user_id=21627

As there is still no uploaded file, I'm closing the patch as
invalid. Please resubmit a new patch when you have one.
History
Date User Action Args
2022-04-11 14:56:09adminsetgithub: 41502
2005-01-28 18:53:14drurlcreate