From 57a3bdf643a5d3243ff8de383799329604a38f91 Mon Sep 17 00:00:00 2001 From: randomdan Date: Mon, 19 Aug 2013 00:11:13 +0000 Subject: Take local copies of settings, config reload can screw them over --- project2/cgi/testCgi.cpp | 6 ++++-- 1 file 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))); -- cgit v1.2.3