Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HEAD/PUT/DELETE support for urllib2.py #41502

Closed
drurl mannequin opened this issue Jan 28, 2005 · 3 comments
Closed

HEAD/PUT/DELETE support for urllib2.py #41502

drurl mannequin opened this issue Jan 28, 2005 · 3 comments
Labels
stdlib Python modules in the Lib dir

Comments

@drurl
Copy link
Mannequin

drurl mannequin commented Jan 28, 2005

BPO 1111653
Nosy @loewis

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2005-03-03.23:02:19.000>
created_at = <Date 2005-01-28.18:53:14.000>
labels = ['invalid', 'library']
title = 'HEAD/PUT/DELETE support for urllib2.py'
updated_at = <Date 2005-03-03.23:02:19.000>
user = 'https://bugs.python.org/drurl'

bugs.python.org fields:

activity = <Date 2005-03-03.23:02:19.000>
actor = 'loewis'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2005-01-28.18:53:14.000>
creator = 'drurl'
dependencies = []
files = []
hgrepos = []
issue_num = 1111653
keywords = ['patch']
message_count = 3.0
messages = ['47630', '47631', '47632']
nosy_count = 2.0
nosy_names = ['loewis', 'drurl']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1111653'
versions = ['Python 2.4']

@drurl
Copy link
Mannequin Author

drurl mannequin commented Jan 28, 2005

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

@drurl drurl mannequin closed this as completed Jan 28, 2005
@drurl drurl mannequin added invalid stdlib Python modules in the Lib dir labels Jan 28, 2005
@loewis
Copy link
Mannequin

loewis mannequin commented Jan 29, 2005

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. :-( )

@loewis
Copy link
Mannequin

loewis mannequin commented Mar 3, 2005

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.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

0 participants