mod_bosh: Don't add a Content-Type header to the HTTP OPTIONS reply.
authorWaqas Hussain <waqas20@gmail.com>
Fri, 22 Oct 2010 03:36:54 +0000 (08:36 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Fri, 22 Oct 2010 03:36:54 +0000 (08:36 +0500)
plugins/mod_bosh.lua

index 4e78cd63263a2d99491097607615d82b02481ba6..9546e653ddd021b2545b7248f81cbd51d142de46 100644 (file)
@@ -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 "<html><body>You really don't look like a BOSH client to me... what do you want?</body></html>";
                end