mod_bosh: Don't add a Content-Type header to the HTTP OPTIONS reply.

Fri, 22 Oct 2010 08:36:54 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Fri, 22 Oct 2010 08:36:54 +0500
changeset 3542
2acaf129e1c3
parent 3541
a72b88953bf2
child 3543
90b21508ac27

mod_bosh: Don't add a Content-Type header to the HTTP OPTIONS reply.

plugins/mod_bosh.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_bosh.lua	Wed Oct 20 03:57:47 2010 +0500
+++ b/plugins/mod_bosh.lua	Fri Oct 22 08:36:54 2010 +0500
@@ -102,7 +102,10 @@
 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

mercurial