Beispiel #1
0
 def application(self, environ, start_response):
     try:
         host, port = get_destination(environ)
     except Exception, e:
         log.error("[Exception][http]: %s" % str(e))
         start_response("400 Bad Request", [("Content-Type", "text/plain; charset=utf-8")])
         return ["Bad Request"]
Beispiel #2
0
 def http(self, environ, start_response):
     try:
         method, url, body, headers = copy_request(environ)
         host, port = get_destination(environ)
     except Exception, e:
         log.error("[Exception][http]: %s" % str(e))
         start_response("400 Bad Request", [("Content-Type", "text/plain; charset=utf-8")])
         yield "Bad Request"
         return
Beispiel #3
0
 def http(self, environ, start_response):
     try:
         method, url, body, headers = copy_request(environ)
         host, port = get_destination(environ)
     except Exception, e:
         log.error("[Exception][http]: %s" % str(e))
         start_response("400 Bad Request",
                        [("Content-Type", "text/plain; charset=utf-8")])
         yield "Bad Request"
         return