aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol2/http_protocol_mock.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-08-17 19:20:28 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-08-17 19:20:28 +0200
commit99129ab5a15bc4708eda80e4f56b46bb0f1efa86 (patch)
tree661d6eaac3cdc47d2f436df9e8defb73e7a75880 /libmproxy/protocol2/http_protocol_mock.py
parenta2b85048892626e6834df06e9022498814724636 (diff)
parent38c456bb627c4570e0ed983229ec8ef2f120a4b6 (diff)
downloadmitmproxy-99129ab5a15bc4708eda80e4f56b46bb0f1efa86.tar.gz
mitmproxy-99129ab5a15bc4708eda80e4f56b46bb0f1efa86.tar.bz2
mitmproxy-99129ab5a15bc4708eda80e4f56b46bb0f1efa86.zip
Merge remote-tracking branch 'Kriechi/proxy-refactor' into proxy-refactor
Conflicts: libmproxy/protocol2/http.py
Diffstat (limited to 'libmproxy/protocol2/http_protocol_mock.py')
-rw-r--r--libmproxy/protocol2/http_protocol_mock.py50
1 files changed, 0 insertions, 50 deletions
diff --git a/libmproxy/protocol2/http_protocol_mock.py b/libmproxy/protocol2/http_protocol_mock.py
deleted file mode 100644
index dd3643f6..00000000
--- a/libmproxy/protocol2/http_protocol_mock.py
+++ /dev/null
@@ -1,50 +0,0 @@
-"""
-Temporary mock to sort out API discrepancies
-"""
-from libmproxy.protocol.http_wrappers import HTTPResponse, HTTPRequest
-from netlib.http.http1 import HTTP1Protocol
-
-
-class HTTP1(object):
- @staticmethod
- def read_request(connection, *args, **kwargs):
- """
- :type connection: object
- """
- return HTTPRequest.from_protocol(HTTP1Protocol(connection), *args, **kwargs)
-
- @staticmethod
- def read_response(connection, *args, **kwargs):
- """
- :type connection: object
- """
- return HTTPResponse.from_protocol(HTTP1Protocol(connection), *args, **kwargs)
-
- @staticmethod
- def read_http_body(connection, *args, **kwargs):
- """
- :type connection: object
- """
- return HTTP1Protocol(connection).read_http_body(*args, **kwargs)
-
-
- @staticmethod
- def _assemble_response_first_line(*args, **kwargs):
- return HTTP1Protocol()._assemble_response_first_line(*args, **kwargs)
-
-
- @staticmethod
- def _assemble_response_headers(*args, **kwargs):
- return HTTP1Protocol()._assemble_response_headers(*args, **kwargs)
-
-
- @staticmethod
- def read_http_body_chunked(connection, *args, **kwargs):
- """
- :type connection: object
- """
- return HTTP1Protocol(connection).read_http_body_chunked(*args, **kwargs)
-
- @staticmethod
- def assemble(*args, **kwargs):
- return HTTP1Protocol().assemble(*args, **kwargs) \ No newline at end of file