diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index e4a2461..51742ff 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -408,7 +408,17 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
408 | { | 408 | { |
409 | HttpWebResponse webRsp = (HttpWebResponse)((WebException)e).Response; | 409 | HttpWebResponse webRsp = (HttpWebResponse)((WebException)e).Response; |
410 | Status = (int)webRsp.StatusCode; | 410 | Status = (int)webRsp.StatusCode; |
411 | ResponseBody = webRsp.StatusDescription; | 411 | try |
412 | { | ||
413 | using (Stream responseStream = webRsp.GetResponseStream()) | ||
414 | { | ||
415 | ResponseBody = responseStream.GetStreamString(); | ||
416 | } | ||
417 | } | ||
418 | catch | ||
419 | { | ||
420 | ResponseBody = webRsp.StatusDescription; | ||
421 | } | ||
412 | } | 422 | } |
413 | else | 423 | else |
414 | { | 424 | { |