Roundup Robot added the comment:
New changeset 1bc41bbbe02d by Ned Deily in branch '3.4':
Issue #22165: Skip test_undecodable_filename on OS X prior to 10.5.
https://hg.python.org/cpython/rev/1bc41bbbe02d
New changeset 85258e08b69b by Ned Deily in branch 'default':
Issue #22165: merge from 3.4
Changes by Senthil Kumaran sent...@uthcode.com:
--
resolution: - fixed
stage: - resolved
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22165
___
Changes by Senthil Kumaran sent...@uthcode.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22165
___
___
Senthil Kumaran added the comment:
Looks like we hit with an encoding issue, which is due to way os.fsdecode() and
os.listdir() decode the filenames.
support.TESTFN_UNDECODABLE
b'@test_99678_tmp\xe7w\xf0'
dir_list = os.listdir(self.tempdir)
dir_list
['@test_99678_tmp%E7w%F0.txt', 'test']
Changes by Senthil Kumaran sent...@uthcode.com:
--
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22165
___
___
Roundup Robot added the comment:
New changeset a894b629bbea by Serhiy Storchaka in branch '3.4':
Issue #22165: Fixed test_undecodable_filename on non-UTF-8 locales.
http://hg.python.org/cpython/rev/a894b629bbea
New changeset 7cdc941d5180 by Serhiy Storchaka in branch 'default':
Issue #22165:
Serhiy Storchaka added the comment:
Oh, I missed that os.listdir() on Mac returns really strange result. Thank you
Senthil.
Here is a patch which try to workaround this. I'm not sure that it is enough.
May be we should fix os.listdir(). Or conclude that this issue can't be fixed
on Mac OS.
Ronald Oussoren added the comment:
OSX returns a strange value in os.listdir because the HFS+ filesystem itself
has unicode filenames and transforms byte strings that are assumed to contain
UTF-8 into something the filesystem can handle (and seems to replace bytes that
aren't valid UTF-8 into
Serhiy Storchaka added the comment:
Well, then the workaround should work.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22165
___
___
Roundup Robot added the comment:
New changeset b05d4f3ee190 by Serhiy Storchaka in branch '3.4':
Issue #22165: Fixed test_undecodable_filename on Mac OS.
http://hg.python.org/cpython/rev/b05d4f3ee190
New changeset 58e0d2c3ead8 by Serhiy Storchaka in branch 'default':
Issue #22165: Fixed
Senthil Kumaran added the comment:
Attached patch looks good to me. If an unittest can be provided for this
situation in test_httpservers.py it will be comprehensive and will be good to
go.
--
nosy: +orsenthil
___
Python tracker
Serhiy Storchaka added the comment:
Here is a patch with a test.
--
assignee: - serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22165
___
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file36388/issue22165_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22165
___
Roundup Robot added the comment:
New changeset f180a9156cc8 by Serhiy Storchaka in branch '3.4':
Issue #22165: SimpleHTTPRequestHandler now supports undecodable file names.
http://hg.python.org/cpython/rev/f180a9156cc8
New changeset 3153a400b739 by Serhiy Storchaka in branch 'default':
Issue
Serhiy Storchaka added the comment:
Thank you for the review Senthil.
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22165
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22165
___
___
Python-bugs-list
New submission from Josh Lee:
While SimpleHTTPServer from Python2 would happily spit out whatever bytes were
in the directory listing, Python3's http.server logs an error and closes the
connection without responding to the HTTP request.
$ mkdir $'\xff'
$ ls
\377/
$ python3 -m http.server
R. David Murray added the comment:
It should return a server error, I think.
--
nosy: +r.david.murray
stage: - needs patch
type: - behavior
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22165
Augie Fackler added the comment:
Why not treat the filename as opaque bytes, and let the client fetch it anyway?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22165
___
R. David Murray added the comment:
Because http traffic is supposed to be either latin-1 or whatever charset is
specified (at least, to my understanding that is the case), so sending
incorrectly encoded data seems wrong.
On the other hand, we support unix files systems not having well defined
Serhiy Storchaka added the comment:
Here is a patch which fixes handling of undecodable paths in
SimpleHTTPRequestHandler.
--
keywords: +patch
nosy: +serhiy.storchaka
stage: needs patch - patch review
Added file: http://bugs.python.org/file36304/issue22165.patch
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: +demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22165
___
___
22 matches
Mail list logo