[ python-Bugs-954981 ] Error in urllib2 Examples

SourceForge.net noreply at sourceforge.net
Sun May 16 17:33:15 EDT 2004


Bugs item #954981, was opened at 2004-05-16 23:33
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=954981&group_id=5470

Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Phillip (phillip_)
Assigned to: Nobody/Anonymous (nobody)
Summary: Error in urllib2 Examples

Initial Comment:
I'll quote from the urllib2 examples:
>>>
Here we are sending a data-stream to the stdin of a CGI
and reading the data it returns to us:

>>> import urllib2
>>> req =
urllib2.Request(url='https://localhost/cgi-bin/test.cgi',
...                       data='This data is passed to
stdin of the CGI')
>>> f = urllib2.urlopen(req)
...
<<<

urllib2 returns:
urllib2.URLError: <urlopen error unknown url type: https>
(This is the Errormsg in 2.3.3, 2.2.3 is a different
syntax but says the same. This is seriously misleading,
as it implies that somehow urllib2 can handle https,
which it can't in this manner. At least not in the way
exampled here.

Please correct or delete this example.

It would be nice if you could provide a working example
for handling https. Examples are a good thing in the
whole httplib / urllib / urllib2 area, since it appears
somewhat hard to overlook.
I'm sorry I can't provide a working version of this
example, as I am trying to figure out how to handle
https myself.

Anyway, it's a documentation bug and needs fixing.

Thanks.

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

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



More information about the Python-bugs-list mailing list