mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
fix display bugs (fixes #243)
This commit is contained in:
parent
d5cfc1c080
commit
28f82d052d
@ -171,7 +171,11 @@ class StatusBar(common.WWrap):
|
||||
|
||||
if self.master.server.config.get_upstream_server and \
|
||||
isinstance(self.master.server.config.get_upstream_server, proxy.ConstUpstreamServerResolver):
|
||||
r.append("[dest:%s]"%utils.unparse_url(*self.master.server.config.get_upstream_server.dst))
|
||||
dst = self.master.server.config.get_upstream_server.dst
|
||||
scheme = "https" if dst[0] else "http"
|
||||
if dst[1] != dst[0]:
|
||||
scheme += "2https" if dst[1] else "http"
|
||||
r.append("[dest:%s]"%utils.unparse_url(scheme, *self.master.server.config.get_upstream_server.dst[2:]))
|
||||
if self.master.scripts:
|
||||
r.append("[scripts:%s]"%len(self.master.scripts))
|
||||
# r.append("[lt:%0.3f]"%self.master.looptime)
|
||||
@ -646,7 +650,6 @@ class ConsoleMaster(flow.FlowMaster):
|
||||
self.statusbar = StatusBar(self, flowview.footer)
|
||||
self.state.set_focus_flow(flow)
|
||||
self.state.view_mode = common.VIEW_FLOW
|
||||
|
||||
self.make_view()
|
||||
self.help_context = flowview.help_context
|
||||
|
||||
|
@ -485,6 +485,8 @@ class HTTPRequest(HTTPMessage):
|
||||
If hostheader is True, we use the value specified in the request
|
||||
Host header to construct the URL.
|
||||
"""
|
||||
if self.form_out == "authority": # upstream proxy mode
|
||||
return "%s:%s" % (self.get_host(hostheader), self.get_port())
|
||||
return utils.unparse_url(self.get_scheme(),
|
||||
self.get_host(hostheader),
|
||||
self.get_port(),
|
||||
|
Loading…
Reference in New Issue
Block a user