[ python-Bugs-1097834 ] urllib2 doesn't handle urls without a scheme

SourceForge.net noreply at sourceforge.net
Fri Jan 7 13:49:36 CET 2005


Bugs item #1097834, was opened at 2005-01-07 13:49
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=1097834&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jack Jansen (jackjansen)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib2 doesn't handle urls without a scheme

Initial Comment:
Unlike urllib, urllib2 does not handle "/path/to/file" style urls 
(without a scheme) as "file:" urls.

I'm not sure whether this is a bug per se, but if this behaviour is 
by design then urllib2 should get a pathname2url() method that 
changes a pathname to a "file:"-prefixed url. urllib.pathname2url() 
does not prefix the url, but that's fine because urllib.urlopen() 
treats urls without schemes as file: urls.


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

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


More information about the Python-bugs-list mailing list