mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-25 09:37:37 +00:00
Fix crash in client playback.
This commit is contained in:
parent
5cd7563d12
commit
9fa09cc1f9
@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
"""
|
"""
|
||||||
This example shows how to graft a WSGI app onto mitmproxy. In this
|
This example shows how to graft a WSGI app onto mitmproxy. In this
|
||||||
instance, we're using the Bottle framework (http://bottlepy.org/) to expose
|
instance, we're using the Bottle framework (http://bottlepy.org/) to expose
|
||||||
a single simplest-possible page.
|
a single simplest-possible page.
|
||||||
"""
|
"""
|
||||||
import bottle
|
import bottle
|
||||||
import os
|
import os
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
"""
|
"""
|
||||||
This example builds on mitmproxy's base proxying infrastructure to
|
This example builds on mitmproxy's base proxying infrastructure to
|
||||||
implement functionality similar to the "sticky cookies" option. This is at
|
implement functionality similar to the "sticky cookies" option. This is at
|
||||||
a lower level than the Flow mechanism, so we're dealing directly with
|
a lower level than the Flow mechanism, so we're dealing directly with
|
||||||
request and response objects.
|
request and response objects.
|
||||||
"""
|
"""
|
||||||
from libmproxy import controller, proxy
|
from libmproxy import controller, proxy
|
||||||
import os
|
import os
|
||||||
|
@ -933,6 +933,7 @@ class ClientPlaybackState:
|
|||||||
"""
|
"""
|
||||||
if self.flows and not self.current:
|
if self.flows and not self.current:
|
||||||
n = self.flows.pop(0)
|
n = self.flows.pop(0)
|
||||||
|
n.request.reply = controller.DummyReply()
|
||||||
n.request.client_conn = None
|
n.request.client_conn = None
|
||||||
self.current = master.handle_request(n.request)
|
self.current = master.handle_request(n.request)
|
||||||
if not testing and not self.current.response:
|
if not testing and not self.current.response:
|
||||||
|
9
setup.py
9
setup.py
@ -92,5 +92,12 @@ setup(
|
|||||||
"Topic :: Internet :: Proxy Servers",
|
"Topic :: Internet :: Proxy Servers",
|
||||||
"Topic :: Software Development :: Testing"
|
"Topic :: Software Development :: Testing"
|
||||||
],
|
],
|
||||||
install_requires=["netlib>=%s"%version.VERSION, "urwid>=1.1", "pyasn1>0.1.2", "pyopenssl>=0.12", "PIL", "lxml"],
|
install_requires=[
|
||||||
|
"netlib>=%s"%version.VERSION,
|
||||||
|
"urwid>=1.1",
|
||||||
|
"pyasn1>0.1.2",
|
||||||
|
"pyopenssl>=0.12",
|
||||||
|
"PIL",
|
||||||
|
"lxml"
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user