From b2830e0a4f46f62db4d34b3e8f93ea505be32000 Mon Sep 17 00:00:00 2001 From: Antonio Herraiz Date: Sat, 19 Sep 2015 12:43:36 +0700 Subject: [PATCH] Fix generation of HTTP response in HTTP proxy --- servers/HTTP_Proxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/HTTP_Proxy.py b/servers/HTTP_Proxy.py index 951d20a..82c9efa 100644 --- a/servers/HTTP_Proxy.py +++ b/servers/HTTP_Proxy.py @@ -65,12 +65,12 @@ def InjectData(data, client, req_uri): print text("[PROXY] Injecting into HTTP Response: %s" % color(settings.Config.HtmlToInject, 3, 1)) Content = Content.replace(HasBody[0], '%s\n%s' % (HasBody[0], settings.Config.HtmlToInject)) - Headers = Headers.replace("Content-Length: "+Len, "Content-Length: "+ str(len(Content))) if "content-encoding: gzip" in Headers.lower(): Content = zlib.compress(Content) - data = Headers +'\r\n'+ Content + Headers = Headers.replace("Content-Length: "+Len, "Content-Length: "+ str(len(Content))) + data = Headers +'\r\n\r\n'+ Content else: if settings.Config.Verbose: