8000 Error 500 if the title is an str object containing non-ascii characters · Issue #43 · jonashaag/klaus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Error 500 if the title is an str object containing non-ascii characters #43
Closed
@ghost

Description

Here is a script to trigger the problem:

# -*- encoding: utf-8 -*-
from wsgiref.simple_server import make_server
from klaus import make_app

application = make_app([], "Éléphant")
print "Serving on http://localhost:8000"
httpd = make_server('', 8000, application)
httpd.serve_forever()

This triggers an error 500:

$ curl http://localhost:8000 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application.</p>

It works fine if the title is a unicode object (eg. u"Éléphant" rather than "Éléphant"). The problem also occurs under mod_wsgi.

Tested with klaus 0.2. For some reason I don't seem to be able to run the code from the master branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0