http2: indicate http version in the ui

This commit is contained in:
Maximilian Hils 2016-02-08 00:45:35 +01:00
parent 370a0f91c1
commit b0477fd8c9
2 changed files with 12 additions and 3 deletions

View File

@ -159,8 +159,11 @@ def raw_format_flow(f, focus, extended):
else:
uc = "title"
url = f["req_url"]
if f["req_http_version"] not in ("HTTP/1.0", "HTTP/1.1"):
url += " " + f["req_http_version"]
req.append(
urwid.Text([(uc, f["req_url"])])
urwid.Text([(uc, url)])
)
pile.append(urwid.Columns(req, dividechars=1))
@ -447,6 +450,7 @@ def format_flow(f, focus, extended=False, hostheader=False, marked=False):
req_is_replay = f.request.is_replay,
req_method = f.request.method,
req_url = f.request.pretty_url if hostheader else f.request.url,
req_http_version = f.request.http_version,
err_msg = f.error.msg if f.error else None,
resp_code = f.response.status_code if f.response else None,

View File

@ -247,11 +247,16 @@ class DumpMaster(flow.FlowMaster):
url = flow.request.url
url = click.style(url, bold=True)
line = "{stickycookie}{client} {method} {url}".format(
httpversion = ""
if flow.request.http_version not in ("HTTP/1.1", "HTTP/1.0"):
httpversion = " " + flow.request.http_version # We hide "normal" HTTP 1.
line = "{stickycookie}{client} {method} {url}{httpversion}".format(
stickycookie=stickycookie,
client=client,
method=method,
url=url
url=url,
httpversion=httpversion
)
self.echo(line)