diff options
author | BlueWall | 2011-02-14 12:54:51 -0500 |
---|---|---|
committer | BlueWall | 2011-02-14 12:54:51 -0500 |
commit | c9d2194ecb3c67cd5961b6094cc157eaf5714f4f (patch) | |
tree | 30c227ffe6a63e5776e1648f1f14757094c3f497 /OpenSim | |
parent | Set filter to send proper rotations for root part (diff) | |
parent | Set filter to send proper rotations for root part (diff) | |
download | opensim-SC_OLD-c9d2194ecb3c67cd5961b6094cc157eaf5714f4f.zip opensim-SC_OLD-c9d2194ecb3c67cd5961b6094cc157eaf5714f4f.tar.gz opensim-SC_OLD-c9d2194ecb3c67cd5961b6094cc157eaf5714f4f.tar.bz2 opensim-SC_OLD-c9d2194ecb3c67cd5961b6094cc157eaf5714f4f.tar.xz |
Merge branch 'master' of /home/opensim/src/OpenSim/Core
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 20 | ||||
-rw-r--r-- | OpenSim/Services/AssetService/AssetService.cs | 2 |
2 files changed, 8 insertions, 14 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index d731ac5..1feeeb3 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Collections.Specialized; | 31 | using System.Collections.Specialized; |
32 | using System.Globalization; | ||
32 | using System.IO; | 33 | using System.IO; |
33 | using System.Net; | 34 | using System.Net; |
34 | using System.Net.Security; | 35 | using System.Net.Security; |
@@ -557,34 +558,27 @@ namespace OpenSim.Framework | |||
557 | { | 558 | { |
558 | float qx = GetQ(x); | 559 | float qx = GetQ(x); |
559 | float qy = GetQ(y); | 560 | float qy = GetQ(y); |
560 | if (qx < qy) | 561 | return qy.CompareTo(qx); // descending order |
561 | return -1; | ||
562 | if (qx == qy) | ||
563 | return 0; | ||
564 | return 1; | ||
565 | } | 562 | } |
566 | 563 | ||
567 | private float GetQ(Object o) | 564 | private float GetQ(Object o) |
568 | { | 565 | { |
569 | // Example: image/png;q=0.9 | 566 | // Example: image/png;q=0.9 |
570 | 567 | ||
568 | float qvalue = 1F; | ||
571 | if (o is String) | 569 | if (o is String) |
572 | { | 570 | { |
573 | string mime = (string)o; | 571 | string mime = (string)o; |
574 | string[] parts = mime.Split(new char[] { ';' }); | 572 | string[] parts = mime.Split(';'); |
575 | if (parts.Length > 1) | 573 | if (parts.Length > 1) |
576 | { | 574 | { |
577 | string[] kvp = parts[1].Split(new char[] { '=' }); | 575 | string[] kvp = parts[1].Split('='); |
578 | if (kvp.Length == 2 && kvp[0] == "q") | 576 | if (kvp.Length == 2 && kvp[0] == "q") |
579 | { | 577 | float.TryParse(kvp[1], NumberStyles.Number, CultureInfo.InvariantCulture, out qvalue); |
580 | float qvalue = 1F; | ||
581 | float.TryParse(kvp[1], out qvalue); | ||
582 | return qvalue; | ||
583 | } | ||
584 | } | 578 | } |
585 | } | 579 | } |
586 | 580 | ||
587 | return 1F; | 581 | return qvalue; |
588 | } | 582 | } |
589 | } | 583 | } |
590 | 584 | ||
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index 3fd2fcf..a81af43 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs | |||
@@ -93,7 +93,7 @@ namespace OpenSim.Services.AssetService | |||
93 | 93 | ||
94 | if (!UUID.TryParse(id, out assetID)) | 94 | if (!UUID.TryParse(id, out assetID)) |
95 | { | 95 | { |
96 | m_log.WarnFormat("[ASSET SERVICE]: Could not parse requested sset id {0}", id); | 96 | m_log.WarnFormat("[ASSET SERVICE]: Could not parse requested asset id {0}", id); |
97 | return null; | 97 | return null; |
98 | } | 98 | } |
99 | 99 | ||