aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc-src/_layout.html4
-rw-r--r--doc-src/_websitelayout.html2
-rw-r--r--doc-src/index.py3
-rwxr-xr-xexamples/proxapp6
-rwxr-xr-xexamples/stickycookies8
-rw-r--r--libmproxy/flow.py2
-rw-r--r--setup.py9
-rw-r--r--test/test_flow.py2
8 files changed, 24 insertions, 12 deletions
diff --git a/doc-src/_layout.html b/doc-src/_layout.html
index 71b15fd2..b64a8558 100644
--- a/doc-src/_layout.html
+++ b/doc-src/_layout.html
@@ -6,7 +6,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
- <a class="brand" href="@!urlTo("/index.html")!@">mitmproxy 0.9 docs</a>
+ <a class="brand" href="@!urlTo(idxpath)!@">mitmproxy 0.9 docs</a>
</div><!--/.nav-collapse -->
</div>
</div>
@@ -17,7 +17,7 @@
<div class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
- $!nav("index.html", this, state)!$
+ $!nav(idxpath, this, state)!$
$!nav("install.html", this, state)!$
$!nav("howmitmproxy.html", this, state)!$
diff --git a/doc-src/_websitelayout.html b/doc-src/_websitelayout.html
index a18ce0e4..f65ee059 100644
--- a/doc-src/_websitelayout.html
+++ b/doc-src/_websitelayout.html
@@ -24,7 +24,7 @@
<div class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
- $!nav("/doc/index.html", this, state)!$
+ $!nav(idxpath, this, state)!$
$!nav("install.html", this, state)!$
$!nav("howmitmproxy.html", this, state)!$
diff --git a/doc-src/index.py b/doc-src/index.py
index 7b65adb9..7b84f982 100644
--- a/doc-src/index.py
+++ b/doc-src/index.py
@@ -8,10 +8,13 @@ from libmproxy import filt
MITMPROXY_SRC = "~/git/public/mitmproxy"
if ns.options.website:
+ ns.idxpath = "doc/index.html"
this.layout = countershape.Layout("_websitelayout.html")
else:
+ ns.idxpath = "index.html"
this.layout = countershape.Layout("_layout.html")
+
ns.title = countershape.template.Template(None, "<h1>@!this.title!@</h1>")
this.titlePrefix = "mitmproxy 0.9 - "
this.markup = markup.Markdown(extras=["footnotes"])
diff --git a/examples/proxapp b/examples/proxapp
index eb5bdbb7..3a94cd55 100755
--- a/examples/proxapp
+++ b/examples/proxapp
@@ -1,8 +1,8 @@
#!/usr/bin/env python
"""
- 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
- a single simplest-possible page.
+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
+a single simplest-possible page.
"""
import bottle
import os
diff --git a/examples/stickycookies b/examples/stickycookies
index b07820fc..17cd6019 100755
--- a/examples/stickycookies
+++ b/examples/stickycookies
@@ -1,9 +1,9 @@
#!/usr/bin/env python
"""
- This example builds on mitmproxy's base proxying infrastructure to
- implement functionality similar to the "sticky cookies" option. This is at
- a lower level than the Flow mechanism, so we're dealing directly with
- request and response objects.
+This example builds on mitmproxy's base proxying infrastructure to
+implement functionality similar to the "sticky cookies" option. This is at
+a lower level than the Flow mechanism, so we're dealing directly with
+request and response objects.
"""
from libmproxy import controller, proxy
import os
diff --git a/libmproxy/flow.py b/libmproxy/flow.py
index 50b30fe1..1d15029b 100644
--- a/libmproxy/flow.py
+++ b/libmproxy/flow.py
@@ -827,7 +827,6 @@ class ClientConnect(StateObject):
def __str__(self):
if self.address:
return "%s:%d"%(self.address[0],self.address[1])
- return "None"
def _load_state(self, state):
self.close = True
@@ -934,6 +933,7 @@ class ClientPlaybackState:
"""
if self.flows and not self.current:
n = self.flows.pop(0)
+ n.request.reply = controller.DummyReply()
n.request.client_conn = None
self.current = master.handle_request(n.request)
if not testing and not self.current.response:
diff --git a/setup.py b/setup.py
index d8eb7cb4..c0b95728 100644
--- a/setup.py
+++ b/setup.py
@@ -92,5 +92,12 @@ setup(
"Topic :: Internet :: Proxy Servers",
"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"
+ ],
)
diff --git a/test/test_flow.py b/test/test_flow.py
index 4ad692bc..718f3551 100644
--- a/test/test_flow.py
+++ b/test/test_flow.py
@@ -1191,6 +1191,8 @@ class TestClientConnect:
c3 = c.copy()
assert c3 == c
+ assert str(c)
+
def test_decoded():
r = tutils.treq()