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
Makefile.in -rw-r--r-- 2.4 KB
abstract.c -rw-r--r-- 28.1 KB
bufferobject.c -rw-r--r-- 12.5 KB
classobject.c -rw-r--r-- 37.5 KB
cobject.c -rw-r--r-- 4.9 KB
complexobject.c -rw-r--r-- 13.7 KB
dictobject.c -rw-r--r-- 23.9 KB
fileobject.c -rw-r--r-- 21.7 KB
floatobject.c -rw-r--r-- 13.2 KB
frameobject.c -rw-r--r-- 9.9 KB
funcobject.c -rw-r--r-- 6.3 KB
intobject.c -rw-r--r-- 16.3 KB
listobject.c -rw-r--r-- 36.6 KB
longobject.c -rw-r--r-- 38.5 KB
methodobject.c -rw-r--r-- 6.5 KB
moduleobject.c -rw-r--r-- 5.6 KB
object.c -rw-r--r-- 18.2 KB
rangeobject.c -rw-r--r-- 5.5 KB
sliceobject.c -rw-r--r-- 3.7 KB
stringobject.c -rw-r--r-- 23.9 KB
tupleobject.c -rw-r--r-- 10.9 KB
typeobject.c -rw-r--r-- 2.8 KB
xxobject.c -rw-r--r-- 3.9 KB

back to top