Skip to content

Commit

Permalink
Fix generation of HTTP response in HTTP proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioherraizs committed Sep 19, 2015
1 parent 5ab431a commit b2830e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions servers/HTTP_Proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b2830e0

Please sign in to comment.