aboutsummaryrefslogtreecommitdiffstats
path: root/pathod/protocols
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-05 13:04:13 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-05 13:04:13 +1200
commit48da24ae7e7be7af94162d35a463f174e22504f6 (patch)
tree1559a5847123d98a68cfd752689c0bf5c5669577 /pathod/protocols
parentc0c45c051a6eadf34d38f1b0d3d96c6a9196f733 (diff)
downloadmitmproxy-48da24ae7e7be7af94162d35a463f174e22504f6.tar.gz
mitmproxy-48da24ae7e7be7af94162d35a463f174e22504f6.tar.bz2
mitmproxy-48da24ae7e7be7af94162d35a463f174e22504f6.zip
First-order removal of pathod API and app
Diffstat (limited to 'pathod/protocols')
-rw-r--r--pathod/protocols/http.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/pathod/protocols/http.py b/pathod/protocols/http.py
index d09b5bf2..6eefb34f 100644
--- a/pathod/protocols/http.py
+++ b/pathod/protocols/http.py
@@ -1,4 +1,3 @@
-from netlib import wsgi
from netlib.exceptions import TlsException
from netlib.http import http1
from .. import version, language
@@ -11,30 +10,6 @@ class HTTPProtocol(object):
def make_error_response(self, reason, body):
return language.http.make_error_response(reason, body)
- def handle_http_app(self, method, path, headers, body, lg):
- """
- Handle a request to the built-in app.
- """
- if self.pathod_handler.server.noweb:
- crafted = self.pathod_handler.make_http_error_response("Access Denied")
- language.serve(crafted, self.pathod_handler.wfile, self.pathod_handler.settings)
- return None, dict(
- type="error",
- msg="Access denied: web interface disabled"
- )
- lg("app: %s %s" % (method, path))
- req = wsgi.Request("http", method, path, b"HTTP/1.1", headers, body)
- flow = wsgi.Flow(self.pathod_handler.address, req)
- sn = self.pathod_handler.connection.getsockname()
- a = wsgi.WSGIAdaptor(
- self.pathod_handler.server.app,
- sn[0],
- self.pathod_handler.server.address.port,
- version.NAMEVERSION
- )
- a.serve(flow, self.pathod_handler.wfile)
- return self.pathod_handler.handle_http_request, None
-
def handle_http_connect(self, connect, lg):
"""
Handle a CONNECT request.