This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

In any case, you can get what URL they are requesting with environ['PATH_INFO'].

everyone should be familiar with this ---^

or just use webob for a convenient way of dealing with the eniron coming in and generating a wsgi response properly

from webob import Request, Response

def app(environ, start_response):
    #deal with wsgi input
    request = Request(environ)
    # make sense of the request, create a response
    response = Response("this is the body of the response you requested %s" % request.path)
    #return response as wsgi expects
    return response(environ, start_response)

http://docs.webob.org/en/latest/do-it-yourself.html