Logged In: YES
user_id=261020
I fear you're right that "fixing" urllib.pathname2url is a bad idea
for backwards-compatibility reasons. Anyway, ISTR file: URLs
with one, two and three slashes, so I guess I have to admit
standardization has failed here.
For the record, though:
You're supposed to have those extra two slashes in a *full*
URL on unix, too. But the docs say:
------
Convert the pathname path from the local syntax for a path to
the form used in the path component of a URL. This does not
produce a complete URL.
------
RFC 1738, section 3.10, makes it clear that the path
component of a file: URL doesn't include those first two slashes
(actually, it's claims the third isn't, either, presumably just to be
subtly different from the generic syntax of RFC 2396 - argh!).
Your point about unix vs. Windows is not relevant: the path
component of a file: URL isn't supposed to be directly
interpreted as an OS filesystem path (RFC 1738 gives a VMS
example).
|