Merge pull request #1245 from danweller18/feature_js_headers
authorJo-Philipp Wich <jo@mein.io>
Wed, 2 Aug 2017 08:34:59 +0000 (10:34 +0200)
committerGitHub <noreply@github.com>
Wed, 2 Aug 2017 08:34:59 +0000 (10:34 +0200)
luci-base: Remove request headers that are set automatically by browser

modules/luci-base/htdocs/luci-static/resources/xhr.js

index 701c12a..3385f8f 100644 (file)
@@ -91,8 +91,6 @@ XHR = function()
 
                xhr.open('POST', url, true);
                xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
-               xhr.setRequestHeader('Content-length', code.length);
-               xhr.setRequestHeader('Connection', 'close');
                xhr.send(code);
        }