[issue22899] http.server.BaseHTTPRequestHandler.parse_request (TypeError: decoding str is not supported)

2015-02-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
status: pending - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22899
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22899] http.server.BaseHTTPRequestHandler.parse_request (TypeError: decoding str is not supported)

2014-11-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

self.raw_requestline is read from self.rfile:

self.raw_requestline = self.rfile.readline(65537)

self.rfile is either socket stream

self.rfile = self.connection.makefile('rb', self.rbufsize)

or in-memory bytes stream

self.rfile = BytesIO(self.packet)

In both cases it is binary stream and produces bytes. I don't see a bug in the 
stdlib, it can be a bug in user code which sets self.rfile or 
self.raw_requestline to invalid value.

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22899
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22899] http.server.BaseHTTPRequestHandler.parse_request (TypeError: decoding str is not supported)

2014-11-19 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
resolution:  - not a bug
status: open - pending

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22899
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22899] http.server.BaseHTTPRequestHandler.parse_request (TypeError: decoding str is not supported)

2014-11-18 Thread Ryan Chartier

New submission from Ryan Chartier:

While the parse_request is handling the requestline, it tries to force the 
string into iso-8859-1 using an unsupported syntax.

Line #274 in server.py

requestline = str(self.raw_requestline, 'iso-8859-1')

Obviously, python complains.

TypeError: decoding str is not supported

I'm running python 3.4.2 and the line is present in the 3.4.2 source I 
downloaded from the python.org today.

That is all.

--
messages: 231350
nosy: recharti
priority: normal
severity: normal
status: open
title: http.server.BaseHTTPRequestHandler.parse_request (TypeError: decoding 
str is not supported)
type: crash
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22899
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22899] http.server.BaseHTTPRequestHandler.parse_request (TypeError: decoding str is not supported)

2014-11-18 Thread Georg Brandl

Georg Brandl added the comment:

With the vanilla BaseHTTPRequestHandler, this shouldn't happen. 
self.raw_requestline is read from a socket file, which returns bytes, so they 
can be decoded using str(bytes, encoding).

Can you please check if there are any third-party packages involved that 
call/subclass the classes from http.server and introduce a bytes/str confusion? 
 They might not be correctly/completely ported to Python 3 in that case.

In any case, a full traceback will be helpful to help debug this.

--
nosy: +georg.brandl

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22899
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com