aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Web
diff options
context:
space:
mode:
authoronefang2019-08-17 08:38:45 +1000
committeronefang2019-08-17 08:38:45 +1000
commit7ed68c3e38b7e1b46aa110d4eb1b1eac686f291e (patch)
tree83c7fbad7fbfb72b134dba69fcd41b406a78302c /OpenSim/Server/Handlers/Web
parentAllow a place for Robust.ini extras. (diff)
downloadopensim-SC_OLD-7ed68c3e38b7e1b46aa110d4eb1b1eac686f291e.zip
opensim-SC_OLD-7ed68c3e38b7e1b46aa110d4eb1b1eac686f291e.tar.gz
opensim-SC_OLD-7ed68c3e38b7e1b46aa110d4eb1b1eac686f291e.tar.bz2
opensim-SC_OLD-7ed68c3e38b7e1b46aa110d4eb1b1eac686f291e.tar.xz
Implement HEAD in our simple web server.
Diffstat (limited to '')
-rw-r--r--OpenSim/Server/Handlers/Web/WebServerConnector.cs13
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