On 04/12/2014, at 11:29 PM, marco del corto <[email protected]> wrote:

>         def application(environ, start_response):
>         status = '200 OK'
>         output = 'myapp.wsgi - Hello World!'
>         response_headers = [('Content-type', 'text/plain'),
>                             ('Content-Length', str(len(output)))]
>         start_response(status, response_headers)

You have to use:

def application(environ, start_response):
    status = '200 OK'
    output = b'Hello World!'

    response_headers = [('Content-type', 'text/plain'),
                        ('Content-Length', str(len(output)))]
    start_response(status, response_headers)

    return [output]
You are using Python 3. The code example would only work on Python 2.

The difference is the 'b' in front of the output string.

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to