This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author orsenthil
Recipients demian.brecht, durin42, jleedev, martin.panter, orsenthil, python-dev, r.david.murray, serhiy.storchaka
Date 2014-08-17.07:59:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1408262353.4.0.810412685287.issue22165@psf.upfronthosting.co.za>
In-reply-to
Content
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']
>>> filename = os.fsdecode(support.TESTFN_UNDECODABLE) + '.txt'
>>> filename
'@test_99678_tmp\udce7w\udcf0.txt'


======================================================================
FAIL: test_undecodable_filename (test.test_httpservers.SimpleHTTPServerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.4.murray-snowleopard/build/Lib/test/test_httpservers.py", line 282, in test_undecodable_filename
    .encode('utf-8', 'surrogateescape'), body)
AssertionError: b'href="%40test_62069_tmp%ED%B3%A7w%ED%B3%B0.txt"' not found in b'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n<title>Directory listing for tmp0asrs9ei/</title>\n</head>\n<body>\n<h1>Directory listing for tmp0asrs9ei/</h1>\n<hr>\n<ul>\n<li><a href="%40test_62069_tmp%25E7w%25F0.txt">@test_62069_tmp%E7w%F0.txt</a></li>\n<li><a href="test">test</a></li>\n</ul>\n<hr>\n</body>\n</html>\n'
History
Date User Action Args
2014-08-17 07:59:13orsenthilsetrecipients: + orsenthil, durin42, r.david.murray, python-dev, martin.panter, serhiy.storchaka, jleedev, demian.brecht
2014-08-17 07:59:13orsenthilsetmessageid: <1408262353.4.0.810412685287.issue22165@psf.upfronthosting.co.za>
2014-08-17 07:59:13orsenthillinkissue22165 messages
2014-08-17 07:59:12orsenthilcreate