diff options
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index 09891f7..035097f 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -223,20 +223,16 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
223 | if (parms.Length - i < 2) | 223 | if (parms.Length - i < 2) |
224 | break; | 224 | break; |
225 | 225 | ||
226 | //Have we reached the end of the list of headers? | ||
227 | //End is marked by a string with a single digit. | ||
228 | //We already know we have at least one parameter | ||
229 | //so it is safe to do this check at top of loop. | ||
230 | if (Char.IsDigit(parms[i][0])) | ||
231 | break; | ||
232 | |||
233 | if (htc.HttpCustomHeaders == null) | 226 | if (htc.HttpCustomHeaders == null) |
234 | htc.HttpCustomHeaders = new List<string>(); | 227 | htc.HttpCustomHeaders = new List<string>(); |
235 | 228 | ||
236 | htc.HttpCustomHeaders.Add(parms[i]); | 229 | htc.HttpCustomHeaders.Add(parms[i]); |
237 | htc.HttpCustomHeaders.Add(parms[i+1]); | 230 | htc.HttpCustomHeaders.Add(parms[i+1]); |
231 | int nexti = i + 2; | ||
232 | if (nexti >= parms.Length || Char.IsDigit(parms[nexti][0])) | ||
233 | break; | ||
238 | 234 | ||
239 | i += 2; | 235 | i = nexti; |
240 | } | 236 | } |
241 | break; | 237 | break; |
242 | 238 | ||