diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 47c3cb8..2000c44 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -13405,6 +13405,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13405 | List<string> param = new List<string>(); | 13405 | List<string> param = new List<string>(); |
13406 | bool ok; | 13406 | bool ok; |
13407 | Int32 flag; | 13407 | Int32 flag; |
13408 | int nCustomHeaders = 0; | ||
13408 | 13409 | ||
13409 | for (int i = 0; i < parameters.Data.Length; i += 2) | 13410 | for (int i = 0; i < parameters.Data.Length; i += 2) |
13410 | { | 13411 | { |
@@ -13431,6 +13432,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13431 | //Second Life documentation for llHTTPRequest. | 13432 | //Second Life documentation for llHTTPRequest. |
13432 | for (int count = 1; count <= 8; ++count) | 13433 | for (int count = 1; count <= 8; ++count) |
13433 | { | 13434 | { |
13435 | if(nCustomHeaders >= 8) | ||
13436 | { | ||
13437 | Error("llHTTPRequest", "Max number of custom headers is 8, excess ignored"); | ||
13438 | break; | ||
13439 | } | ||
13440 | |||
13434 | //Enough parameters remaining for (another) header? | 13441 | //Enough parameters remaining for (another) header? |
13435 | if (parameters.Data.Length - i < 2) | 13442 | if (parameters.Data.Length - i < 2) |
13436 | { | 13443 | { |
@@ -13445,15 +13452,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13445 | 13452 | ||
13446 | param.Add(parameters.Data[i].ToString()); | 13453 | param.Add(parameters.Data[i].ToString()); |
13447 | param.Add(parameters.Data[i+1].ToString()); | 13454 | param.Add(parameters.Data[i+1].ToString()); |
13455 | nCustomHeaders++; | ||
13448 | 13456 | ||
13449 | //Have we reached the end of the list of headers? | 13457 | //Have we reached the end of the list of headers? |
13450 | //End is marked by a string with a single digit. | 13458 | //End is marked by a string with a single digit. |
13451 | if (i+2 >= parameters.Data.Length || | 13459 | if (i + 2 >= parameters.Data.Length || |
13452 | Char.IsDigit(parameters.Data[i].ToString()[0])) | 13460 | Char.IsDigit(parameters.Data[i + 2].ToString()[0])) |
13453 | { | 13461 | { |
13454 | break; | 13462 | break; |
13455 | } | 13463 | } |
13456 | |||
13457 | i += 2; | 13464 | i += 2; |
13458 | } | 13465 | } |
13459 | } | 13466 | } |