aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2012-07-23 15:34:25 -0700
committerAldo Cortesi <aldo@corte.si>2012-07-23 15:34:25 -0700
commit4ce309107a13753fe002d13166ff2bbe532e8148 (patch)
treea8e68bedda61e6f833607bba23b4ff074c93fd11
parent2be31b726ac38132c7a3f89cc3d47afe666c5f53 (diff)
parent525a8f6a160425dfe7a65dab015865add247b362 (diff)
downloadmitmproxy-4ce309107a13753fe002d13166ff2bbe532e8148.tar.gz
mitmproxy-4ce309107a13753fe002d13166ff2bbe532e8148.tar.bz2
mitmproxy-4ce309107a13753fe002d13166ff2bbe532e8148.zip
Merge pull request #52 from cjneasbi/master
Fixed a bug causing an AttributeError when request is set to false but response not None in ProxyHandler.handle_request
-rw-r--r--libmproxy/proxy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index 0a2aa922..ed16d9ed 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -192,7 +192,7 @@ class ProxyHandler(tcp.BaseHandler):
if response is None:
return
self.send_response(response)
- if http.request_connection_close(request.httpversion, request.headers):
+ if request and http.request_connection_close(request.httpversion, request.headers):
return
# We could keep the client connection when the server
# connection needs to go away. However, we want to mimic