aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Scripting
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Scripting')
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index 7677834..1eb0387 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -357,8 +357,18 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
357 } 357 }
358 catch (Exception e) 358 catch (Exception e)
359 { 359 {
360 status = (int)OSHttpStatusCode.ClientErrorJoker; 360 if (e is WebException && ((WebException)e).Status == WebExceptionStatus.ProtocolError)
361 response_body = e.Message; 361 {
362 HttpWebResponse webRsp = (HttpWebResponse)((WebException)e).Response;
363 status = (int)webRsp.StatusCode;
364 response_body = webRsp.StatusDescription;
365 }
366 else
367 {
368 status = (int)OSHttpStatusCode.ClientErrorJoker;
369 response_body = e.Message;
370 }
371
362 finished = true; 372 finished = true;
363 return; 373 return;
364 } 374 }