All Downloads are FREE. Search and download functionalities are using the official Maven repository.

glassfish.wsgi.WSGITestApp.py Maven / Gradle / Ivy

There is a newer version: 0.5.6
Show newest version
# I'm a WSGI test app method thing!

def handle(environ, start_response):
    if (environ["PATH_INFO"] == "/error"):
        start_response("500 Internal Server Error",[('Content-Type', 'text/html'), ])
    if (environ["PATH_INFO"] == "/notfound"):
        start_response("404 Not Found",[('Content-Type', 'text/html'), ])
    else :
        start_response("200 OK", [('Content-Type', 'text/html'), ])
    body = ["WSGI Test App Working!\n"]
    for key in environ.keys():
        content = str(key) + " is " + str(environ[key]) + "\n"
        body.append(content)
    return body



    




© 2015 - 2024 Weber Informatics LLC | Privacy Policy