aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Assets
diff options
context:
space:
mode:
authorJohn Hurliman2010-04-08 15:57:00 -0700
committerJohn Hurliman2010-04-08 15:57:57 -0700
commit54cedfe4320573ac302b11716e293086110a4f9b (patch)
treedc2017d6133bdf891529106019ec914b541c8851 /OpenSim/Region/CoreModules/Avatar/Assets
parentAdded a missing reference to prebuild.xml (diff)
downloadopensim-SC-54cedfe4320573ac302b11716e293086110a4f9b.zip
opensim-SC-54cedfe4320573ac302b11716e293086110a4f9b.tar.gz
opensim-SC-54cedfe4320573ac302b11716e293086110a4f9b.tar.bz2
opensim-SC-54cedfe4320573ac302b11716e293086110a4f9b.tar.xz
Changed the GetTextureModule backport to work with the 0.6.9 codebase
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Assets')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
index 53d2cef..3b66859 100644
--- a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
@@ -109,7 +109,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
109 109
110 // Try to parse the texture ID from the request URL 110 // Try to parse the texture ID from the request URL
111 NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query); 111 NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query);
112 string textureStr = query.GetOne("texture_id"); 112 string textureStr = GetOne(query, "texture_id");
113 113
114 if (m_assetService == null) 114 if (m_assetService == null)
115 { 115 {
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
166 166
167 private void SendTexture(OSHttpRequest request, OSHttpResponse response, AssetBase texture) 167 private void SendTexture(OSHttpRequest request, OSHttpResponse response, AssetBase texture)
168 { 168 {
169 string range = request.Headers.GetOne("Range"); 169 string range = GetOne(request.Headers, "Range");
170 if (!String.IsNullOrEmpty(range)) 170 if (!String.IsNullOrEmpty(range))
171 { 171 {
172 // Range request 172 // Range request
@@ -216,5 +216,14 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
216 start = end = 0; 216 start = end = 0;
217 return false; 217 return false;
218 } 218 }
219
220 private static string GetOne(NameValueCollection collection, string key)
221 {
222 string[] values = collection.GetValues(key);
223 if (values != null && values.Length > 0)
224 return values[0];
225
226 return null;
227 }
219 } 228 }
220} 229}