From: Waqas Hussain Date: Fri, 22 Oct 2010 03:36:54 +0000 (+0500) Subject: mod_bosh: Don't add a Content-Type header to the HTTP OPTIONS reply. X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=579971dc7148f955c93df8ae533346451d23889c;p=prosody.git mod_bosh: Don't add a Content-Type header to the HTTP OPTIONS reply. --- diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index 4e78cd63..9546e653 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -102,7 +102,10 @@ end function handle_request(method, body, request) if (not body) or request.method ~= "POST" then if request.method == "OPTIONS" then - return { headers = default_headers, body = "" }; + local headers = {}; + for k,v in pairs(default_headers) do headers[k] = v; end + headers["Content-Type"] = nil; + return { headers = headers, body = "" }; else return "You really don't look like a BOSH client to me... what do you want?"; end