aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-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}