diff options
author | Melanie | 2009-09-22 05:24:22 +0100 |
---|---|---|
committer | Melanie | 2009-09-22 05:24:22 +0100 |
commit | c5be401d46dfbb1e47927b4123130c43c6a054b5 (patch) | |
tree | 707dd011c1fe9f2057adaafe87351da82eb3f9b9 | |
parent | Disable the handler execution for poll services until the ramifications (diff) | |
download | opensim-SC-c5be401d46dfbb1e47927b4123130c43c6a054b5.zip opensim-SC-c5be401d46dfbb1e47927b4123130c43c6a054b5.tar.gz opensim-SC-c5be401d46dfbb1e47927b4123130c43c6a054b5.tar.bz2 opensim-SC-c5be401d46dfbb1e47927b4123130c43c6a054b5.tar.xz |
Remove support for executing a handler on poll. It caused other issues
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 5c9fa9b..0198960 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -337,24 +337,19 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
337 | // handled | 337 | // handled |
338 | //m_log.Debug("[BASE HTTP SERVER]: Handling Request" + request.RawUrl); | 338 | //m_log.Debug("[BASE HTTP SERVER]: Handling Request" + request.RawUrl); |
339 | 339 | ||
340 | // If the response is null, then we're not going to respond here. This case | 340 | IHttpAgentHandler agentHandler; |
341 | // triggers when we're at the head of a HTTP poll | ||
342 | // | ||
343 | if (response != null) | ||
344 | { | ||
345 | IHttpAgentHandler agentHandler; | ||
346 | 341 | ||
347 | if (TryGetAgentHandler(request, response, out agentHandler)) | 342 | if (TryGetAgentHandler(request, response, out agentHandler)) |
343 | { | ||
344 | if (HandleAgentRequest(agentHandler, request, response)) | ||
348 | { | 345 | { |
349 | if (HandleAgentRequest(agentHandler, request, response)) | 346 | return; |
350 | { | ||
351 | return; | ||
352 | } | ||
353 | } | 347 | } |
354 | |||
355 | //response.KeepAlive = true; | ||
356 | response.SendChunked = false; | ||
357 | } | 348 | } |
349 | |||
350 | //response.KeepAlive = true; | ||
351 | response.SendChunked = false; | ||
352 | |||
358 | IRequestHandler requestHandler; | 353 | IRequestHandler requestHandler; |
359 | 354 | ||
360 | string path = request.RawUrl; | 355 | string path = request.RawUrl; |
@@ -368,8 +363,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
368 | // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. | 363 | // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. |
369 | byte[] buffer = null; | 364 | byte[] buffer = null; |
370 | 365 | ||
371 | if (response != null) | 366 | response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type. |
372 | response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type. | ||
373 | 367 | ||
374 | 368 | ||
375 | if (requestHandler is IStreamedRequestHandler) | 369 | if (requestHandler is IStreamedRequestHandler) |
@@ -425,12 +419,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
425 | //m_log.Warn("[HTTP]: " + requestBody); | 419 | //m_log.Warn("[HTTP]: " + requestBody); |
426 | 420 | ||
427 | } | 421 | } |
428 | // If we're not responding, we dont' care about the reply | 422 | DoHTTPGruntWork(HTTPRequestHandler.Handle(path, keysvals), response); |
429 | // | ||
430 | if (response == null) | ||
431 | HTTPRequestHandler.Handle(path, keysvals); | ||
432 | else | ||
433 | DoHTTPGruntWork(HTTPRequestHandler.Handle(path, keysvals), response); | ||
434 | return; | 423 | return; |
435 | } | 424 | } |
436 | else | 425 | else |
@@ -445,11 +434,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
445 | } | 434 | } |
446 | } | 435 | } |
447 | 436 | ||
448 | // The handler has run and we're not yet ready to respond, bail | ||
449 | // | ||
450 | if (response == null) | ||
451 | return; | ||
452 | |||
453 | request.InputStream.Close(); | 437 | request.InputStream.Close(); |
454 | 438 | ||
455 | // HTTP IN support. The script engine taes it from here | 439 | // HTTP IN support. The script engine taes it from here |