Staging
v0.5.1
https://github.com/python/cpython
Revision 33add0a95aa6c5ba5dbb8cae7b51a253209ecd6f authored by Guido van Rossum on 18 December 1998, 15:25:22 UTC, committed by Guido van Rossum on 18 December 1998, 15:25:22 UTC
File names with "funny" characters get translated wrong by
pathname2url (any variety).  E.g. the (Unix) file "/ufs/sjoerd/#tmp"
gets translated into "/ufs/sjoerd/#tmp" which, when interpreted as a
URL is file "/ufs/sjoerd/" with fragment ID "tmp".

Here's an easy fix.  (An alternative fix would be to change the
various implementations of pathname2url and url2pathname to include
calls to quote and unquote.

[The main problem is with the normal use of URLs:
	url = url2pathname(file)
	transmit url
	url, tag = splittag(url)
	urlopen(url)
]

In addition, this patch fixes some uses of unquote:
- the host part of URLs should be unquoted
- the file path in the FTP URL should be unquoted before it is split
  into components.
- because of the latter, I removed all unquoting from ftpwrapper,
  and moved it to the caller, but that is not essential
1 parent dc86a4e
History
Tip revision: 33add0a95aa6c5ba5dbb8cae7b51a253209ecd6f authored by Guido van Rossum on 18 December 1998, 15:25:22 UTC
Sjoerd Mullender:
Tip revision: 33add0a
File Mode Size
ACKS -rw-r--r-- 3.6 KB
AIX-NOTES -rw-r--r-- 7.3 KB
BLURB -rw-r--r-- 1.6 KB
BLURB.LUTZ -rw-r--r-- 5.6 KB
BLURB.WINDOWS -rw-r--r-- 3.8 KB
COPYRIGHT -rw-r--r-- 1.3 KB
Fixcprt.py -rwxr-xr-x 1.6 KB
HISTORY -rw-r--r-- 120.9 KB
HPUX-NOTES -rw-r--r-- 1.0 KB
HYPE -rw-r--r-- 3.1 KB
Makefile -rw-r--r-- 242 bytes
Makefile.pre.in -rw-r--r-- 10.0 KB
NEWS -rw-r--r-- 117.6 KB
NEXT-NOTES -rw-r--r-- 2.2 KB
PURIFY.README -rw-r--r-- 3.6 KB
Porting -rw-r--r-- 1.9 KB
README -rw-r--r-- 1.6 KB
RENAME -rw-r--r-- 10.9 KB
RFD -rw-r--r-- 3.9 KB
ccpy-style.el -rw-r--r-- 1.3 KB
cheatsheet -rw-r--r-- 21.8 KB
comparisons -rw-r--r-- 6.6 KB
editline-fix -rw-r--r-- 2.4 KB
faq2html.py -rwxr-xr-x 6.6 KB
fixfuncptrs.sh -rwxr-xr-x 2.2 KB
indent.pro -rw-r--r-- 66 bytes
python-mode.el -rw-r--r-- 111.2 KB
python.gif -rw-r--r-- 7.2 KB
python.man -rw-r--r-- 8.0 KB
renumber.py -rwxr-xr-x 2.6 KB
setuid-prog.c -rw-r--r-- 5.3 KB
vgrindefs -rw-r--r-- 498 bytes

README

back to top