fix display bugs (fixes #243)

This commit is contained in:
Maximilian Hils 2014-03-18 19:38:02 +01:00
parent d5cfc1c080
commit 28f82d052d
2 changed files with 7 additions and 2 deletions

View File

@ -171,7 +171,11 @@ class StatusBar(common.WWrap):
if self.master.server.config.get_upstream_server and \ if self.master.server.config.get_upstream_server and \
isinstance(self.master.server.config.get_upstream_server, proxy.ConstUpstreamServerResolver): 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: if self.master.scripts:
r.append("[scripts:%s]"%len(self.master.scripts)) r.append("[scripts:%s]"%len(self.master.scripts))
# r.append("[lt:%0.3f]"%self.master.looptime) # r.append("[lt:%0.3f]"%self.master.looptime)
@ -646,7 +650,6 @@ class ConsoleMaster(flow.FlowMaster):
self.statusbar = StatusBar(self, flowview.footer) self.statusbar = StatusBar(self, flowview.footer)
self.state.set_focus_flow(flow) self.state.set_focus_flow(flow)
self.state.view_mode = common.VIEW_FLOW self.state.view_mode = common.VIEW_FLOW
self.make_view() self.make_view()
self.help_context = flowview.help_context self.help_context = flowview.help_context

View File

@ -485,6 +485,8 @@ class HTTPRequest(HTTPMessage):
If hostheader is True, we use the value specified in the request If hostheader is True, we use the value specified in the request
Host header to construct the URL. 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(), return utils.unparse_url(self.get_scheme(),
self.get_host(hostheader), self.get_host(hostheader),
self.get_port(), self.get_port(),