* 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)
ThreadPoolClientBranch
lbsa71 2008-02-20 08:04:12 +00:00
parent b77c48e75e
commit bf42637ee8
1 changed files with 17 additions and 1 deletions

View File

@ -362,6 +362,20 @@ namespace OpenSim.Framework.Servers
}
public void HandleHTTPRequest(HttpListenerRequest request, HttpListenerResponse response)
{
switch( request.HttpMethod )
{
case "OPTIONS":
response.StatusCode = 200;
return;
default:
HandleContentVerbs(request, response);
return;
}
}
private void HandleContentVerbs(HttpListenerRequest request, HttpListenerResponse response)
{
// This is a test. There's a workable alternative.. as this way sucks.
// We'd like to put this into a text file parhaps that's easily editable.
@ -374,6 +388,8 @@ namespace OpenSim.Framework.Servers
// I depend on show_login_form being in the secondlife.exe parameters to figure out
// to display the form, or process it.
// a better way would be nifty.
Stream requestStream = request.InputStream;
Encoding encoding = Encoding.UTF8;
@ -422,7 +438,7 @@ namespace OpenSim.Framework.Servers
Hashtable responsedata = requestprocessor(keysvals);
DoHTTPGruntWork(responsedata,response);
//SendHTML500(response);
//SendHTML500(response);
}
else