diff options
Diffstat (limited to 'OpenSim/Server/Handlers/Web/WebServerConnector.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Web/WebServerConnector.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Server/Handlers/Web/WebServerConnector.cs b/OpenSim/Server/Handlers/Web/WebServerConnector.cs index 7879e4e..c18e09e 100644 --- a/OpenSim/Server/Handlers/Web/WebServerConnector.cs +++ b/OpenSim/Server/Handlers/Web/WebServerConnector.cs | |||
@@ -139,8 +139,7 @@ namespace OpenSim.Server.Handlers.Web | |||
139 | m_log.InfoFormat("[WEB SERVICE]: {0} method path {1} query {2} value {3}", method, reqpath, q, (string) request[q]); | 139 | m_log.InfoFormat("[WEB SERVICE]: {0} method path {1} query {2} value {3}", method, reqpath, q, (string) request[q]); |
140 | 140 | ||
141 | reply["int_response_code"] = 200; | 141 | reply["int_response_code"] = 200; |
142 | // TODO - need to support HEAD method, seems to be what triggers the endles GETs. | 142 | if (("GET" == method) || ("HEAD" == method)) |
143 | if ("GET" == method) | ||
144 | { | 143 | { |
145 | if (File.Exists(path)) | 144 | if (File.Exists(path)) |
146 | { | 145 | { |
@@ -160,6 +159,11 @@ namespace OpenSim.Server.Handlers.Web | |||
160 | reply["int_response_code"] = 304; | 159 | reply["int_response_code"] = 304; |
161 | m_log.InfoFormat("[WEB SERVICE]: If-Modified-Since is earliar or equal to Last-Modified, from {0}", path); | 160 | m_log.InfoFormat("[WEB SERVICE]: If-Modified-Since is earliar or equal to Last-Modified, from {0}", path); |
162 | reply["headers"] = replyHeaders; | 161 | reply["headers"] = replyHeaders; |
162 | if ("HEAD" == method) | ||
163 | { | ||
164 | reply["bin_response_data"] = null; | ||
165 | reply["str_response_string"] = null; | ||
166 | } | ||
163 | return reply; | 167 | return reply; |
164 | } | 168 | } |
165 | } | 169 | } |
@@ -311,6 +315,11 @@ namespace OpenSim.Server.Handlers.Web | |||
311 | 315 | ||
312 | m_log.Info("[WEB SERVICE]: "); | 316 | m_log.Info("[WEB SERVICE]: "); |
313 | reply["headers"] = replyHeaders; | 317 | reply["headers"] = replyHeaders; |
318 | if ("HEAD" == method) | ||
319 | { | ||
320 | reply["bin_response_data"] = null; | ||
321 | reply["str_response_string"] = null; | ||
322 | } | ||
314 | return reply; | 323 | return reply; |
315 | } | 324 | } |
316 | 325 | ||