diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs index d45962f..04536e4 100644 --- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs | |||
@@ -274,27 +274,27 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL | |||
274 | stream.Close(); | 274 | stream.Close(); |
275 | 275 | ||
276 | if (response != null) | 276 | if (response != null) |
277 | response.Close(); | ||
278 | |||
279 | if ( | ||
280 | response.StatusCode == HttpStatusCode.MovedPermanently | ||
281 | || response.StatusCode == HttpStatusCode.Found | ||
282 | || response.StatusCode == HttpStatusCode.SeeOther | ||
283 | || response.StatusCode == HttpStatusCode.TemporaryRedirect) | ||
284 | { | 277 | { |
285 | string redirectedUrl = response.Headers["Location"]; | 278 | if (response.StatusCode == HttpStatusCode.MovedPermanently |
279 | || response.StatusCode == HttpStatusCode.Found | ||
280 | || response.StatusCode == HttpStatusCode.SeeOther | ||
281 | || response.StatusCode == HttpStatusCode.TemporaryRedirect) | ||
282 | { | ||
283 | string redirectedUrl = response.Headers["Location"]; | ||
286 | 284 | ||
287 | MakeHttpRequest(redirectedUrl, state.RequestID); | 285 | MakeHttpRequest(redirectedUrl, state.RequestID); |
288 | } | 286 | } |
289 | else | 287 | else |
290 | { | 288 | { |
291 | m_log.DebugFormat("[LOADIMAGEURLMODULE]: Returning {0} bytes of image data for request {1}", | 289 | m_log.DebugFormat("[LOADIMAGEURLMODULE]: Returning {0} bytes of image data for request {1}", |
292 | imageJ2000.Length, state.RequestID); | 290 | imageJ2000.Length, state.RequestID); |
293 | 291 | ||
294 | m_textureManager.ReturnData( | 292 | m_textureManager.ReturnData( |
295 | state.RequestID, | 293 | state.RequestID, |
296 | new OpenSim.Region.CoreModules.Scripting.DynamicTexture.DynamicTexture( | 294 | new OpenSim.Region.CoreModules.Scripting.DynamicTexture.DynamicTexture( |
297 | request.RequestUri, null, imageJ2000, newSize, false)); | 295 | request.RequestUri, null, imageJ2000, newSize, false)); |
296 | } | ||
297 | response.Close(); | ||
298 | } | 298 | } |
299 | } | 299 | } |
300 | } | 300 | } |