From 525a8f6a160425dfe7a65dab015865add247b362 Mon Sep 17 00:00:00 2001 From: Chris Neasbitt Date: Tue, 17 Jul 2012 13:24:15 -0400 Subject: Fixed a bug causing an AttributeError when request is set to false but response not None in ProxyHandler.handle_request --- libmproxy/proxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3