Software / code / prosody
Comparison
plugins/mod_bosh.lua @ 3542:2acaf129e1c3
mod_bosh: Don't add a Content-Type header to the HTTP OPTIONS reply.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Fri, 22 Oct 2010 08:36:54 +0500 |
| parent | 3492:6d782b1fcc8a |
| child | 3684:bd071e3901dc |
comparison
equal
deleted
inserted
replaced
| 3541:a72b88953bf2 | 3542:2acaf129e1c3 |
|---|---|
| 100 end | 100 end |
| 101 | 101 |
| 102 function handle_request(method, body, request) | 102 function handle_request(method, body, request) |
| 103 if (not body) or request.method ~= "POST" then | 103 if (not body) or request.method ~= "POST" then |
| 104 if request.method == "OPTIONS" then | 104 if request.method == "OPTIONS" then |
| 105 return { headers = default_headers, body = "" }; | 105 local headers = {}; |
| 106 for k,v in pairs(default_headers) do headers[k] = v; end | |
| 107 headers["Content-Type"] = nil; | |
| 108 return { headers = headers, body = "" }; | |
| 106 else | 109 else |
| 107 return "<html><body>You really don't look like a BOSH client to me... what do you want?</body></html>"; | 110 return "<html><body>You really don't look like a BOSH client to me... what do you want?</body></html>"; |
| 108 end | 111 end |
| 109 end | 112 end |
| 110 if not method then | 113 if not method then |