diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-08-16 15:19:11 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-08-16 15:19:11 +0200 |
commit | 38c456bb627c4570e0ed983229ec8ef2f120a4b6 (patch) | |
tree | 2119fb74f6f4884b2e7edd91322ac09d3b6cd7e3 /libmproxy/protocol2/http_protocol_mock.py | |
parent | c04fa1b233224d28e85be34ab5b6a8718497488c (diff) | |
download | mitmproxy-38c456bb627c4570e0ed983229ec8ef2f120a4b6.tar.gz mitmproxy-38c456bb627c4570e0ed983229ec8ef2f120a4b6.tar.bz2 mitmproxy-38c456bb627c4570e0ed983229ec8ef2f120a4b6.zip |
implement Http1 and Http2 protocols as layers
Diffstat (limited to 'libmproxy/protocol2/http_protocol_mock.py')
-rw-r--r-- | libmproxy/protocol2/http_protocol_mock.py | 50 |
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 |