Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix crash when trying to see the content of a request/response before…

… ack.

self.flow.{response,request}.acked did not exist before acknowledging
the flow.
Also add a message when the response has not been recieved.
  • Loading branch information...
commit f4b1ed0d0ee0341c3642f6ac86510d8713bc0a08 1 parent 5c33f67
@Rafiot authored
Showing with 5 additions and 1 deletion.
  1. +3 −1 libmproxy/console/flowview.py
  2. +2 −0  libmproxy/flow.py
View
4 libmproxy/console/flowview.py
@@ -210,7 +210,9 @@ def wrap_body(self, active, body):
else:
parts.append(self._tab(qt, "heading_inactive"))
- if self.flow.intercepting and self.flow.response and not self.flow.response.acked:
+ if self.flow.intercepting and not self.flow.response:
+ st = "No response yet"
+ elif self.flow.intercepting and not self.flow.response.acked:
st = "Response intercepted"
else:
st = "Response"
View
2  libmproxy/flow.py
@@ -298,6 +298,7 @@ def __init__(self, client_conn, httpversion, host, port, scheme, method, path, h
self.timestamp_start = timestamp_start or utils.timestamp()
self.timestamp_end = max(timestamp_end or utils.timestamp(), timestamp_start)
self.close = False
+ self.acked = False
# Have this request's cookies been modified by sticky cookies or auth?
self.stickycookie = False
@@ -613,6 +614,7 @@ def __init__(self, request, httpversion, code, msg, headers, content, cert, time
self.timestamp_start = timestamp_start or utils.timestamp()
self.timestamp_end = max(timestamp_end or utils.timestamp(), timestamp_start)
self.replay = False
+ self.acked = False
def _refresh_cookie(self, c, delta):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.