aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/pathoc.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-05-02 16:17:00 +1200
committerAldo Cortesi <aldo@nullcube.com>2015-05-02 16:17:00 +1200
commit9109b3cc8cca05f34d3ddee062cf7f8bc401af31 (patch)
tree2d1f2f4ed115a9bc7c26eb87e697b34fe860368f /libpathod/pathoc.py
parent601cdf70c7339a59537cc8402e4f2648f398b28d (diff)
downloadmitmproxy-9109b3cc8cca05f34d3ddee062cf7f8bc401af31.tar.gz
mitmproxy-9109b3cc8cca05f34d3ddee062cf7f8bc401af31.tar.bz2
mitmproxy-9109b3cc8cca05f34d3ddee062cf7f8bc401af31.zip
Massive refactoring to split up language implementation.
Diffstat (limited to 'libpathod/pathoc.py')
-rw-r--r--libpathod/pathoc.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py
index 6c01a68f..e874412d 100644
--- a/libpathod/pathoc.py
+++ b/libpathod/pathoc.py
@@ -12,7 +12,8 @@ import OpenSSL.crypto
from netlib import tcp, http, certutils, websockets
import netlib.utils
-import language
+import language.http
+import language.websockets
import utils
@@ -346,7 +347,7 @@ class Pathoc(tcp.TCPClient):
"""
Performs a single request.
- r: A language.Request object, or a string representing one request.
+ r: A language.http.Request object, or a string representing one request.
Returns Response if we have a non-ignored response.
@@ -385,7 +386,7 @@ class Pathoc(tcp.TCPClient):
"""
Performs a single request.
- r: A language.Request object, or a string representing one request.
+ r: A language.http.Request object, or a string representing one request.
Returns Response if we have a non-ignored response.
@@ -393,12 +394,12 @@ class Pathoc(tcp.TCPClient):
"""
if isinstance(r, basestring):
r = language.parse_requests(r)[0]
- if isinstance(r, language.Request):
+ if isinstance(r, language.http.Request):
if r.ws:
return self.websocket_start(r, self.websocket_get_frame)
else:
return self.http(r)
- elif isinstance(r, language.WebsocketFrame):
+ elif isinstance(r, language.websockets.WebsocketFrame):
self.websocket_send_frame(r)