aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting
diff options
context:
space:
mode:
authorUbitUmarov2017-04-26 07:19:44 +0100
committerUbitUmarov2017-04-26 07:19:44 +0100
commitce3af94a693aa05e90416649f832f36b62630c69 (patch)
tree3a82e7f115da47508eb61fafd729be7d913192af /OpenSim/Region/CoreModules/Scripting
parentIf we're going to show regions twice (in standalone) at least make the format... (diff)
downloadopensim-SC_OLD-ce3af94a693aa05e90416649f832f36b62630c69.zip
opensim-SC_OLD-ce3af94a693aa05e90416649f832f36b62630c69.tar.gz
opensim-SC_OLD-ce3af94a693aa05e90416649f832f36b62630c69.tar.bz2
opensim-SC_OLD-ce3af94a693aa05e90416649f832f36b62630c69.tar.xz
mantis 6738: change parsing of the HTTP_CUSTOM_HEADER parameter and ignore entries in excess of 8 on the request
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs12
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