summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2013-08-19 00:11:13 +0000
committerrandomdan <randomdan@localhost>2013-08-19 00:11:13 +0000
commit162a1ccb47e3a94c2aa37761dd0daf44a55e15dc (patch)
tree39823d3a36533e2544ed3e01cbfdcc7d4532f06a
parentCentralise and improve notfound and exception logging (diff)
downloadproject2-162a1ccb47e3a94c2aa37761dd0daf44a55e15dc.tar.bz2
project2-162a1ccb47e3a94c2aa37761dd0daf44a55e15dc.tar.xz
project2-162a1ccb47e3a94c2aa37761dd0daf44a55e15dc.zip
Take local copies of settings, config reload can screw them over
-rw-r--r--project2/cgi/testCgi.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/project2/cgi/testCgi.cpp b/project2/cgi/testCgi.cpp
index d923d3c..6648cd3 100644
--- a/project2/cgi/testCgi.cpp
+++ b/project2/cgi/testCgi.cpp
@@ -57,8 +57,10 @@ class TestInput : public cgicc::CgiInput, public CgiEnvInput {
}
}
- while (runCount-- > 0) {
- BOOST_FOREACH(const auto & url, urls) {
+ const auto localUrls(urls);
+ auto localRunCount(runCount);
+ while (localRunCount-- > 0) {
+ BOOST_FOREACH(const auto & url, localUrls) {
int qm = url.find('?');
if (qm != -1) {
optStore()["REDIRECT_URL"] = StrPtr(new std::string(url.substr(0, qm)));