Minor doc fixes and import cleanups.

This commit is contained in:
Aldo Cortesi 2012-02-20 10:15:58 +13:00
parent 0c3035a2b5
commit 25a06c3ec1
5 changed files with 8 additions and 8 deletions

View File

@ -3,11 +3,12 @@
<li><a href="@!urlTo("intro.html")!@">Introduction</a></li> <li><a href="@!urlTo("intro.html")!@">Introduction</a></li>
<li><a href="@!urlTo("mitmproxy.html")!@">mitmproxy</a></li> <li><a href="@!urlTo("mitmproxy.html")!@">mitmproxy</a></li>
<li><a href="@!urlTo("mitmdump.html")!@">mitmdump</a></li> <li><a href="@!urlTo("mitmdump.html")!@">mitmdump</a></li>
<li>Concepts</li> <li>Features</li>
<ul> <ul>
<li><a href="@!urlTo("clientreplay.html")!@">Client-side replay</a></li> <li><a href="@!urlTo("clientreplay.html")!@">Client-side replay</a></li>
<li><a href="@!urlTo("serverreplay.html")!@">Server-side replay</a></li> <li><a href="@!urlTo("serverreplay.html")!@">Server-side replay</a></li>
<li><a href="@!urlTo("sticky.html")!@">Sticky cookies and auth</a></li> <li><a href="@!urlTo("sticky.html")!@">Sticky cookies and auth</a></li>
<li><a href="@!urlTo("reverseproxy.html")!@">Reverse proxy mode</a></li>
<li><a href="@!urlTo("anticache.html")!@">Anticache</a></li> <li><a href="@!urlTo("anticache.html")!@">Anticache</a></li>
<li><a href="@!urlTo("filters.html")!@">Filter expressions</a></li> <li><a href="@!urlTo("filters.html")!@">Filter expressions</a></li>
</ul> </ul>

View File

@ -73,6 +73,7 @@ pages = [
Page("clientreplay.html", "Client-side replay"), Page("clientreplay.html", "Client-side replay"),
Page("serverreplay.html", "Server-side replay"), Page("serverreplay.html", "Server-side replay"),
Page("sticky.html", "Sticky cookies and auth"), Page("sticky.html", "Sticky cookies and auth"),
Page("reverseproxy.html", "Reverse proxy mode"),
Page("anticache.html", "Anticache"), Page("anticache.html", "Anticache"),
Page("filters.html", "Filter expressions"), Page("filters.html", "Filter expressions"),
Page("scripts.html", "Scripts"), Page("scripts.html", "Scripts"),

View File

View File

@ -13,11 +13,10 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import mailcap, mimetypes, tempfile, os, subprocess, glob, time, re import mailcap, mimetypes, tempfile, os, subprocess, glob, time
import os.path, sys import os.path, sys
import cStringIO
import urwid import urwid
from .. import controller, utils, filt, flow from .. import controller, utils, flow
import connlist, connview, help, common, kveditor, palettes import connlist, connview, help, common, kveditor, palettes
EVENTLOG_SIZE = 500 EVENTLOG_SIZE = 500
@ -177,18 +176,17 @@ class StatusBar(common.WWrap):
t = [ t = [
('heading', ("[%s]"%self.master.state.flow_count()).ljust(7)), ('heading', ("[%s]"%self.master.state.flow_count()).ljust(7)),
] ]
t.extend(self.get_status())
if self.master.server: if self.master.server:
boundaddr = "[%s:%s]"%(self.master.server.address or "*", self.master.server.port) boundaddr = "[%s:%s]"%(self.master.server.address or "*", self.master.server.port)
else: else:
boundaddr = "" boundaddr = ""
t.extend(self.get_status())
status = urwid.AttrWrap(urwid.Columns([ status = urwid.AttrWrap(urwid.Columns([
urwid.Text(t), urwid.Text(t),
urwid.Text( urwid.Text(
[ [
self.helptext, self.helptext,
boundaddr
], ],
align="right" align="right"
), ),

View File

@ -1429,7 +1429,7 @@ class FlowReader:
data = tnetstring.load(self.fo) data = tnetstring.load(self.fo)
off = self.fo.tell() off = self.fo.tell()
yield Flow._from_state(data) yield Flow._from_state(data)
except ValueError, v: except ValueError:
# Error is due to EOF # Error is due to EOF
if self.fo.tell() == off and self.fo.read() == '': if self.fo.tell() == off and self.fo.read() == '':
return return