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
commit57a3bdf643a5d3243ff8de383799329604a38f91 (patch)
tree39823d3a36533e2544ed3e01cbfdcc7d4532f06a
parentCentralise and improve notfound and exception logging (diff)
downloadproject2-57a3bdf643a5d3243ff8de383799329604a38f91.tar.bz2
project2-57a3bdf643a5d3243ff8de383799329604a38f91.tar.xz
project2-57a3bdf643a5d3243ff8de383799329604a38f91.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)));