コード例 #1
0
ファイル: smart_relay.py プロジェクト: yudf2010/firefly-proxy
 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"]
コード例 #2
0
ファイル: socks_relay.py プロジェクト: 52M/firefly-proxy
 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
コード例 #3
0
ファイル: socks_relay.py プロジェクト: wwl74100/firefly
 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