mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-02-07 02:28:50 +00:00
minor fixes
This commit is contained in:
parent
e9c834a30d
commit
83536e7e53
@ -11,7 +11,7 @@ import requests
|
||||
from netlib import odict, wsgi, tcp
|
||||
import netlib.http
|
||||
from . import controller, protocol, tnetstring, filt, script, version, app
|
||||
from .protocol import http
|
||||
from .protocol import http, handle
|
||||
from .proxy.connection import ServerConnection
|
||||
from .proxy.primitives import ProxyError
|
||||
|
||||
@ -765,7 +765,7 @@ class FlowReader:
|
||||
v = ".".join(str(i) for i in data["version"])
|
||||
raise FlowReadError("Incompatible serialized data version: %s"%v)
|
||||
off = self.fo.tell()
|
||||
yield protocol.handle.protocols[data["conntype"]]["flow"]._from_state(data)
|
||||
yield handle.protocols[data["conntype"]]["flow"]._from_state(data)
|
||||
except ValueError, v:
|
||||
# Error is due to EOF
|
||||
if self.fo.tell() == off and self.fo.read() == '':
|
||||
|
@ -751,7 +751,7 @@ class HTTPFlow(Flow):
|
||||
"""
|
||||
|
||||
def __init__(self, client_conn, server_conn, change_server=None):
|
||||
Flow.__init__(self, "http", client_conn, server_conn)
|
||||
super(HTTPFlow, self).__init__("http", client_conn, server_conn)
|
||||
self.request = None
|
||||
"""@type: HTTPRequest"""
|
||||
self.response = None
|
||||
|
@ -139,7 +139,7 @@ class Flow(stateobject.SimpleStateObject, BackreferenceMixin):
|
||||
class ProtocolHandler(object):
|
||||
def __init__(self, c):
|
||||
self.c = c
|
||||
"""@type: libmproxy.proxy.ConnectionHandler"""
|
||||
"""@type: libmproxy.proxy.server.ConnectionHandler"""
|
||||
|
||||
def handle_messages(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user