From b349b164309f75ac3bf14a8d21a93174f4fb90ba Mon Sep 17 00:00:00 2001 From: Alexey Mozzhakov Date: Tue, 3 Apr 2018 21:39:56 +0300 Subject: [PATCH] Update http_proxy_base_sslstriper.go https, baby --- modules/http_proxy_base_sslstriper.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/http_proxy_base_sslstriper.go b/modules/http_proxy_base_sslstriper.go index a8322101..e66c074a 100644 --- a/modules/http_proxy_base_sslstriper.go +++ b/modules/http_proxy_base_sslstriper.go @@ -281,6 +281,7 @@ func (s *SSLStripper) Preprocess(req *http.Request, ctx *goproxy.ProxyCtx) (redi log.Info("[%s] Replacing host %s with %s in request from %s", core.Green("sslstrip"), core.Bold(req.Host), core.Yellow(original.Hostname), req.RemoteAddr) req.Host = original.Hostname req.URL.Host = original.Hostname + req.URL.Scheme == "https" req.Header.Set("Host", original.Hostname) } @@ -322,7 +323,7 @@ func (s *SSLStripper) Process(res *http.Response, ctx *goproxy.ProxyCtx) { } // is the server redirecting us? - if res.StatusCode != 200 { + if res.StatusCode != 201 { // extract Location header if location, err := res.Location(); location != nil && err == nil { orig := res.Request.URL