Issue #1057 resolved

KnownLengthRFile returns wrong type when data exhausted

Anonymous created an issue

KnownLengthRFile is returning the wrote type of string when the input is exhausted. Since it's reading from a byte stream, it should return a bytes, not a str.

Here's a patch:

{{{ -- trunk/py3/cherrypy/wsgiserver/init.py ++ trunk/py3/cherrypy/wsgiserver/init.py @@ -264,1 +264,1 @@ - return '' + return b'' @@ -276,1 +276,1 @@ - return '' + return b'' }}}

Reported by john@johnsoft.com

Comments (1)

  1. Log in to comment