diff options
author | lbsa71 | 2008-02-20 08:04:12 +0000 |
---|---|---|
committer | lbsa71 | 2008-02-20 08:04:12 +0000 |
commit | bf42637ee8017b7776d0e1d89a8c17962ff185b5 (patch) | |
tree | d38b622dbfc10c6c0768ac0abd7b533f4d944324 | |
parent | * Cleanup of some memory consuming items on ScenePresence.Close(). (diff) | |
download | opensim-SC-bf42637ee8017b7776d0e1d89a8c17962ff185b5.zip opensim-SC-bf42637ee8017b7776d0e1d89a8c17962ff185b5.tar.gz opensim-SC-bf42637ee8017b7776d0e1d89a8c17962ff185b5.tar.bz2 opensim-SC-bf42637ee8017b7776d0e1d89a8c17962ff185b5.tar.xz |
* Caught 'OPTIONS' verb in BaseHttpServer that would otherwise explode.
(There are actually other non-content requests too, but I didn't know what we wanted to do with them)
-rw-r--r-- | OpenSim/Framework/Servers/BaseHttpServer.cs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 2966349..662eefd 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -363,6 +363,20 @@ namespace OpenSim.Framework.Servers | |||
363 | 363 | ||
364 | public void HandleHTTPRequest(HttpListenerRequest request, HttpListenerResponse response) | 364 | public void HandleHTTPRequest(HttpListenerRequest request, HttpListenerResponse response) |
365 | { | 365 | { |
366 | switch( request.HttpMethod ) | ||
367 | { | ||
368 | case "OPTIONS": | ||
369 | response.StatusCode = 200; | ||
370 | return; | ||
371 | |||
372 | default: | ||
373 | HandleContentVerbs(request, response); | ||
374 | return; | ||
375 | } | ||
376 | } | ||
377 | |||
378 | private void HandleContentVerbs(HttpListenerRequest request, HttpListenerResponse response) | ||
379 | { | ||
366 | // This is a test. There's a workable alternative.. as this way sucks. | 380 | // This is a test. There's a workable alternative.. as this way sucks. |
367 | // We'd like to put this into a text file parhaps that's easily editable. | 381 | // We'd like to put this into a text file parhaps that's easily editable. |
368 | // | 382 | // |
@@ -374,6 +388,8 @@ namespace OpenSim.Framework.Servers | |||
374 | // I depend on show_login_form being in the secondlife.exe parameters to figure out | 388 | // I depend on show_login_form being in the secondlife.exe parameters to figure out |
375 | // to display the form, or process it. | 389 | // to display the form, or process it. |
376 | // a better way would be nifty. | 390 | // a better way would be nifty. |
391 | |||
392 | |||
377 | Stream requestStream = request.InputStream; | 393 | Stream requestStream = request.InputStream; |
378 | 394 | ||
379 | Encoding encoding = Encoding.UTF8; | 395 | Encoding encoding = Encoding.UTF8; |
@@ -422,7 +438,7 @@ namespace OpenSim.Framework.Servers | |||
422 | Hashtable responsedata = requestprocessor(keysvals); | 438 | Hashtable responsedata = requestprocessor(keysvals); |
423 | DoHTTPGruntWork(responsedata,response); | 439 | DoHTTPGruntWork(responsedata,response); |
424 | 440 | ||
425 | //SendHTML500(response); | 441 | //SendHTML500(response); |
426 | 442 | ||
427 | } | 443 | } |
428 | else | 444 | else |