homepage

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 spaun2002
Recipients amaury.forgeotdarc, baikie, ezio.melotti, jesterKing, lemburg, loewis, r.david.murray, spaun2002, vstinner
Date 2012年04月12日.21:52:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334267534.32.0.327031999875.issue9377@psf.upfronthosting.co.za>
In-reply-to
Content
Originally I tried 3.2.2 (32bit), but I've just checked 3.2.3 and got the same.
A code for reproduce is simple:
from socket import gethostbyaddr
a = gethostbyaddr('127.0.0.1')
leads to:
Traceback (most recent call last):
 File "C:\Users\user\test\test.py", line 13, in <module>
 a = gethostbyaddr('127.0.0.1')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcf in position 5: invalid continuation byte
Or more complex sample:
def main():
 import http.server
 port = 80
 handlerClass = http.server.SimpleHTTPRequestHandler
 srv = http.server.HTTPServer(("", port), handlerClass )
 srv.serve_forever()
if __name__ == "__main__":
 main()
Attempt of connection to the server leads to:
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 1156)
Traceback (most recent call last):
 File "C:\Python32\lib\socketserver.py", line 284, in _handle_request_noblock
 self.process_request(request, client_address)
 File "C:\Python32\lib\socketserver.py", line 310, in process_request
 self.finish_request(request, client_address)
 File "C:\Python32\lib\socketserver.py", line 323, in finish_request
 self.RequestHandlerClass(request, client_address, self)
 File "C:\Python32\lib\socketserver.py", line 637, in __init__
 self.handle()
 File "C:\Python32\lib\http\server.py", line 396, in handle
 self.handle_one_request()
 File "C:\Python32\lib\http\server.py", line 384, in handle_one_request
 method()
 File "C:\Python32\lib\http\server.py", line 657, in do_GET
 f = self.send_head()
 File "C:\Python32\lib\http\server.py", line 701, in send_head
 self.send_response(200)
 File "C:\Python32\lib\http\server.py", line 438, in send_response
 self.log_request(code)
 File "C:\Python32\lib\http\server.py", line 483, in log_request
 self.requestline, str(code), str(size))
 File "C:\Python32\lib\http\server.py", line 517, in log_message
 (self.address_string(),
 File "C:\Python32\lib\http\server.py", line 559, in address_string
 return socket.getfqdn(host)
 File "C:\Python32\lib\socket.py", line 355, in getfqdn
 hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcf in position 5: invalid continuation byte
----------------------------------------
P.S. My PC name is "USER-ПК"
History
Date User Action Args
2012年04月12日 21:52:14spaun2002setrecipients: + spaun2002, lemburg, loewis, amaury.forgeotdarc, vstinner, baikie, ezio.melotti, r.david.murray, jesterKing
2012年04月12日 21:52:14spaun2002setmessageid: <1334267534.32.0.327031999875.issue9377@psf.upfronthosting.co.za>
2012年04月12日 21:52:13spaun2002linkissue9377 messages
2012年04月12日 21:52:13spaun2002create

AltStyle によって変換されたページ (->オリジナル) /