diff options
author | Justin Clark-Casey (justincc) | 2011-11-29 17:26:45 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-11-29 17:26:45 +0000 |
commit | 679a5f6c0b3c531e66311869646b972eb7cef834 (patch) | |
tree | 79d46d34123cd88630e23da928b27f27388c7ec5 /OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |
parent | Improve some of the debug help messages (diff) | |
download | opensim-SC-679a5f6c0b3c531e66311869646b972eb7cef834.zip opensim-SC-679a5f6c0b3c531e66311869646b972eb7cef834.tar.gz opensim-SC-679a5f6c0b3c531e66311869646b972eb7cef834.tar.bz2 opensim-SC-679a5f6c0b3c531e66311869646b972eb7cef834.tar.xz |
With "debug http 1", show the path with the query string instead of just the path.
Also simplifies debug levels to just 0 and 1
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 689a292..7bd1836 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -447,14 +447,12 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
447 | string path = request.RawUrl; | 447 | string path = request.RawUrl; |
448 | string handlerKey = GetHandlerKey(request.HttpMethod, path); | 448 | string handlerKey = GetHandlerKey(request.HttpMethod, path); |
449 | 449 | ||
450 | if (DebugLevel >= 1) | ||
451 | m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); | ||
452 | |||
453 | if (TryGetStreamHandler(handlerKey, out requestHandler)) | 450 | if (TryGetStreamHandler(handlerKey, out requestHandler)) |
454 | { | 451 | { |
455 | if (DebugLevel >= 2) | 452 | if (DebugLevel >= 1) |
456 | m_log.DebugFormat( | 453 | m_log.DebugFormat( |
457 | "[BASE HTTP SERVER]: Found stream handler {0} for request to {1}", handlerKey, path); | 454 | "[BASE HTTP SERVER]: Found stream handler for {0} {1}", |
455 | request.HttpMethod, request.Url.PathAndQuery); | ||
458 | 456 | ||
459 | // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. | 457 | // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. |
460 | byte[] buffer = null; | 458 | byte[] buffer = null; |
@@ -488,7 +486,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
488 | string[] querystringkeys = request.QueryString.AllKeys; | 486 | string[] querystringkeys = request.QueryString.AllKeys; |
489 | string[] rHeaders = request.Headers.AllKeys; | 487 | string[] rHeaders = request.Headers.AllKeys; |
490 | 488 | ||
491 | |||
492 | foreach (string queryname in querystringkeys) | 489 | foreach (string queryname in querystringkeys) |
493 | { | 490 | { |
494 | keysvals.Add(queryname, request.QueryString[queryname]); | 491 | keysvals.Add(queryname, request.QueryString[queryname]); |
@@ -575,10 +572,10 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
575 | if (strAccept.Contains("application/llsd+xml") || | 572 | if (strAccept.Contains("application/llsd+xml") || |
576 | strAccept.Contains("application/llsd+json")) | 573 | strAccept.Contains("application/llsd+json")) |
577 | { | 574 | { |
578 | if (DebugLevel >= 2) | 575 | if (DebugLevel >= 1) |
579 | m_log.DebugFormat( | 576 | m_log.DebugFormat( |
580 | "[BASE HTTP SERVER]: Found an application/llsd+xml accept header for request to {0}", | 577 | "[BASE HTTP SERVER]: Found application/llsd+xml accept header handler for {0} {1}", |
581 | path); | 578 | request.HttpMethod, request.Url.PathAndQuery); |
582 | 579 | ||
583 | HandleLLSDRequests(request, response); | 580 | HandleLLSDRequests(request, response); |
584 | return; | 581 | return; |
@@ -591,10 +588,10 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
591 | case null: | 588 | case null: |
592 | case "text/html": | 589 | case "text/html": |
593 | 590 | ||
594 | if (DebugLevel >= 2) | 591 | if (DebugLevel >= 1) |
595 | m_log.DebugFormat( | 592 | m_log.DebugFormat( |
596 | "[BASE HTTP SERVER]: Found a {0} content type for request to {1}", | 593 | "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", |
597 | request.ContentType, path); | 594 | request.ContentType, request.HttpMethod, request.Url.PathAndQuery); |
598 | 595 | ||
599 | HandleHTTPRequest(request, response); | 596 | HandleHTTPRequest(request, response); |
600 | return; | 597 | return; |
@@ -603,10 +600,10 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
603 | case "application/xml+llsd": | 600 | case "application/xml+llsd": |
604 | case "application/llsd+json": | 601 | case "application/llsd+json": |
605 | 602 | ||
606 | if (DebugLevel >= 2) | 603 | if (DebugLevel >= 1) |
607 | m_log.DebugFormat( | 604 | m_log.DebugFormat( |
608 | "[BASE HTTP SERVER]: Found a {0} content type for request to {1}", | 605 | "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", |
609 | request.ContentType, path); | 606 | request.ContentType, request.HttpMethod, request.Url.PathAndQuery); |
610 | 607 | ||
611 | HandleLLSDRequests(request, response); | 608 | HandleLLSDRequests(request, response); |
612 | return; | 609 | return; |
@@ -624,9 +621,10 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
624 | //m_log.Info("[Debug BASE HTTP SERVER]: Checking for LLSD Handler"); | 621 | //m_log.Info("[Debug BASE HTTP SERVER]: Checking for LLSD Handler"); |
625 | if (DoWeHaveALLSDHandler(request.RawUrl)) | 622 | if (DoWeHaveALLSDHandler(request.RawUrl)) |
626 | { | 623 | { |
627 | if (DebugLevel >= 2) | 624 | if (DebugLevel >= 1) |
628 | m_log.DebugFormat( | 625 | m_log.DebugFormat( |
629 | "[BASE HTTP SERVER]: Found an LLSD handler for request to {0}", path); | 626 | "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", |
627 | request.ContentType, request.HttpMethod, request.Url.PathAndQuery); | ||
630 | 628 | ||
631 | HandleLLSDRequests(request, response); | 629 | HandleLLSDRequests(request, response); |
632 | return; | 630 | return; |
@@ -635,17 +633,19 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
635 | // m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl); | 633 | // m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl); |
636 | if (DoWeHaveAHTTPHandler(request.RawUrl)) | 634 | if (DoWeHaveAHTTPHandler(request.RawUrl)) |
637 | { | 635 | { |
638 | if (DebugLevel >= 2) | 636 | if (DebugLevel >= 1) |
639 | m_log.DebugFormat( | 637 | m_log.DebugFormat( |
640 | "[BASE HTTP SERVER]: Found an HTTP handler for request to {0}", path); | 638 | "[BASE HTTP SERVER]: Found a {0} content type handler for {1} {2}", |
639 | request.ContentType, request.HttpMethod, request.Url.PathAndQuery); | ||
641 | 640 | ||
642 | HandleHTTPRequest(request, response); | 641 | HandleHTTPRequest(request, response); |
643 | return; | 642 | return; |
644 | } | 643 | } |
645 | 644 | ||
646 | if (DebugLevel >= 2) | 645 | if (DebugLevel >= 1) |
647 | m_log.DebugFormat( | 646 | m_log.DebugFormat( |
648 | "[BASE HTTP SERVER]: Treating request to {0} as a generic XMLRPC request", path); | 647 | "[BASE HTTP SERVER]: Assuming a generic XMLRPC request for {0} {1}", |
648 | request.HttpMethod, request.Url.PathAndQuery); | ||
649 | 649 | ||
650 | // generic login request. | 650 | // generic login request. |
651 | HandleXmlRpcRequests(request, response); | 651 | HandleXmlRpcRequests(request, response); |