New submission from Dmitry Vasiliev <d...@hlabs.spb.ru>:

It seems the wsgiref package was copied from Python 2.* without any
modifications. There are already 3 issues about that but they only
describe a part of the problem so I decided to start a new one. The
issues was:

http://bugs.python.org/issue3348
http://bugs.python.org/issue3795
http://bugs.python.org/issue4522

The attached patch fix the problem with the following changes:

- Fixed headers handling in wsgiref/simple_server.py;

- Fixed encoding problems. Now WSGI applications must return iterable
with bytes but start_response() allow status and headers as bytes and as
strings. "wsgi.input" file-like now use BytesIO instead of StringIO;

- Fixed tests;

- Updated documentation examples;

----------
components: Library (Lib)
files: wsgiref.patch
keywords: patch
messages: 78171
nosy: hdima
severity: normal
status: open
title: wsgiref package totally broken
type: crash
versions: Python 3.0
Added file: http://bugs.python.org/file12423/wsgiref.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4718>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to