diff options
author | Teravus Ovares | 2008-08-26 05:20:46 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-08-26 05:20:46 +0000 |
commit | b3a6f8d688fa68d45cde43d81c1e7607e4f7cf57 (patch) | |
tree | e9b66194e28d505c5d5123382f9dc3b1b903b8f0 /OpenSim/Framework | |
parent | * Fixed a bug that occurred if your home region wasn't logged in, in standalo... (diff) | |
download | opensim-SC-b3a6f8d688fa68d45cde43d81c1e7607e4f7cf57.zip opensim-SC-b3a6f8d688fa68d45cde43d81c1e7607e4f7cf57.tar.gz opensim-SC-b3a6f8d688fa68d45cde43d81c1e7607e4f7cf57.tar.bz2 opensim-SC-b3a6f8d688fa68d45cde43d81c1e7607e4f7cf57.tar.xz |
* Workaround for application/llsd+xml requests coming in as application/xml
* When OGP is active, disable SSL certificate chain validation. I'll add more options here to come, as well as a way to test against a group of known certificate subjects.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Servers/BaseHttpServer.cs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 7b2b599..13c5752 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -272,6 +272,13 @@ namespace OpenSim.Framework.Servers | |||
272 | case "text/xml": | 272 | case "text/xml": |
273 | case "application/xml": | 273 | case "application/xml": |
274 | default: | 274 | default: |
275 | if (DoWeHaveALLSDHandler(request.RawUrl)) | ||
276 | { | ||
277 | m_log.ErrorFormat("[BASE HTTP SERVER]: Potentially incorrect content type on Registered LLSD CAP: Content Type:{0}", request.ContentType); | ||
278 | HandleLLSDRequests(request, response); | ||
279 | |||
280 | return; | ||
281 | } | ||
275 | HandleXmlRpcRequests(request, response); | 282 | HandleXmlRpcRequests(request, response); |
276 | return; | 283 | return; |
277 | } | 284 | } |
@@ -532,6 +539,47 @@ namespace OpenSim.Framework.Servers | |||
532 | } | 539 | } |
533 | } | 540 | } |
534 | 541 | ||
542 | private bool DoWeHaveALLSDHandler(string path) | ||
543 | { | ||
544 | |||
545 | string[] pathbase = path.Split('/'); | ||
546 | string searchquery = "/"; | ||
547 | |||
548 | if (pathbase.Length < 1) | ||
549 | return false; | ||
550 | |||
551 | for (int i = 1; i < pathbase.Length; i++) | ||
552 | { | ||
553 | searchquery += pathbase[i]; | ||
554 | if (pathbase.Length - 1 != i) | ||
555 | searchquery += "/"; | ||
556 | } | ||
557 | |||
558 | string bestMatch = null; | ||
559 | |||
560 | foreach (string pattern in m_llsdHandlers.Keys) | ||
561 | { | ||
562 | if (searchquery.StartsWith(searchquery)) | ||
563 | { | ||
564 | if (String.IsNullOrEmpty(bestMatch) || searchquery.Length > bestMatch.Length) | ||
565 | { | ||
566 | bestMatch = pattern; | ||
567 | } | ||
568 | } | ||
569 | } | ||
570 | |||
571 | if (String.IsNullOrEmpty(bestMatch)) | ||
572 | { | ||
573 | |||
574 | return false; | ||
575 | } | ||
576 | else | ||
577 | { | ||
578 | |||
579 | return true; | ||
580 | } | ||
581 | } | ||
582 | |||
535 | private bool TryGetLLSDHandler(string path, out LLSDMethod llsdHandler) | 583 | private bool TryGetLLSDHandler(string path, out LLSDMethod llsdHandler) |
536 | { | 584 | { |
537 | llsdHandler = null; | 585 | llsdHandler = null; |