Esempio n. 1
0
def pyips(environ, start_response):

    query_values = cgi.parse_qsl(environ["QUERY_STRING"])

    image_str, content_type = pyipsmodule.process_request(query_values)

    start_response("200 OK", [("Content-Type", content_type)])
    return [image_str]
Esempio n. 2
0
def process(req):

    # return str(req), str(dir(req)), req.parsed_uri
    query_values = cgi.parse_qsl(req.parsed_uri[7])  # environ['QUERY_STRING'])

    image_str, content_type = pyipsmodule.process_request(query_values)
    # start_response('200 OK', [('Content-Type', content_type)])
    req.content_type = content_type
    return image_str