diff options
| author | Maximilian Hils <git@maximilianhils.com> | 2014-02-06 00:53:39 +0100 | 
|---|---|---|
| committer | Maximilian Hils <git@maximilianhils.com> | 2014-02-06 00:53:39 +0100 | 
| commit | cb397ec788519069aeb785f4a635f30a897288b5 (patch) | |
| tree | e397f47cfd8edfbab344e3f38ef579d4e70e82f1 /libmproxy/protocol/http.py | |
| parent | 80683e77bcb16b361e7eeaf6ad49048564d7acab (diff) | |
| download | mitmproxy-cb397ec788519069aeb785f4a635f30a897288b5.tar.gz mitmproxy-cb397ec788519069aeb785f4a635f30a897288b5.tar.bz2 mitmproxy-cb397ec788519069aeb785f4a635f30a897288b5.zip  | |
fix bugs, expose timestamp information to console ui
Diffstat (limited to 'libmproxy/protocol/http.py')
| -rw-r--r-- | libmproxy/protocol/http.py | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index 069030ef..d9afcbf2 100644 --- a/libmproxy/protocol/http.py +++ b/libmproxy/protocol/http.py @@ -735,7 +735,7 @@ class HTTPFlow(Flow):          """@type: HTTPRequest"""          self.response = None          """@type: HTTPResponse""" -        self.change_server = None  # Used by flow.request.set_url to change the server address +        self.change_server = change_server  # Used by flow.request.set_url to change the server address          self.intercepting = False  # FIXME: Should that rather be an attribute of Flow? @@ -880,6 +880,9 @@ class HTTPHandler(ProtocolHandler, TemporaryServerChangeMixin):              else:                  flow.response = self.get_response_from_server(flow.request) +            flow.server_conn = self.c.server_conn  # no further manipulation of self.c.server_conn beyond this point. +                                                   # we can safely set it as the final attribute valueh here. +              self.c.log("response", [flow.response._assemble_first_line()])              response_reply = self.c.channel.ask("response" if LEGACY else "httpresponse",                                                  flow.response if LEGACY else flow) @@ -898,7 +901,6 @@ class HTTPHandler(ProtocolHandler, TemporaryServerChangeMixin):              if flow.request.form_in == "authority":                  self.ssl_upgrade(flow.request) -            flow.server_conn = self.c.server_conn              self.restore_server()  # If the user has changed the target server on this connection,                                     # restore the original target server              return True  | 
