From 48da24ae7e7be7af94162d35a463f174e22504f6 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 5 Jun 2016 13:04:13 +1200 Subject: First-order removal of pathod API and app --- pathod/protocols/http.py | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'pathod/protocols') 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. -- cgit v1.2.3