(original) (raw)

changeset: 70035:5add0c01933f branch: 3.2 parent: 70029:af18b150065e user: Senthil Kumaran senthil@uthcode.com date: Wed May 11 22:34:59 2011 +0800 files: Doc/library/wsgiref.rst description: Issue #11968 - the start_response header values in wsgiref shoudl be str not bytes. The PEP-0333 says that and test_wsgiref follows the same. Updated docs accordingly. diff -r af18b150065e -r 5add0c01933f Doc/library/wsgiref.rst --- a/Doc/library/wsgiref.rst Wed May 11 00:58:26 2011 +0200 +++ b/Doc/library/wsgiref.rst Wed May 11 22:34:59 2011 +0800 @@ -122,8 +122,8 @@ def simple_app(environ, start_response): setup_testing_defaults(environ) - status = b'200 OK' - headers = [(b'Content-type', b'text/plain; charset=utf-8')] + status = '200 OK' + headers = [('Content-type', 'text/plain; charset=utf-8')] start_response(status, headers) @@ -414,8 +414,8 @@ # Our callable object which is intentionally not compliant to the # standard, so the validator is going to break def simple_app(environ, start_response): - status = b'200 OK' # HTTP Status - headers = [(b'Content-type', b'text/plain')] # HTTP Headers + status = '200 OK' # HTTP Status + headers = [('Content-type', 'text/plain')] # HTTP Headers start_response(status, headers) # This is going to break because we need to return a list, and @@ -754,8 +754,8 @@ # is a dictionary containing CGI-style envrironment variables and the # second variable is the callable object (see PEP 333). def hello_world_app(environ, start_response): - status = b'200 OK' # HTTP Status - headers = [(b'Content-type', b'text/plain; charset=utf-8')] # HTTP Headers + status = '200 OK' # HTTP Status + headers = [('Content-type', 'text/plain; charset=utf-8')] # HTTP Headers start_response(status, headers) # The returned object is going to be printed /senthil@uthcode.com