httpclient: Send the correct Host-Header if we are following a redirect
[project/luci.git] / libs / httpclient / luasrc / httpclient.lua
index 4f955931037df3f3c6dd8969b843a56dcbb0a3ee..69abddff327ea5a92f82a8386e3598a713bc511a 100644 (file)
@@ -303,6 +303,9 @@ function request_raw(uri, options)
                        end
                        
                        options.depth = options.depth - 1
+                       if options.headers then
+                               options.headers.Host = nil
+                       end
                        sock:close()
                        
                        return request_raw(nuri, options)