diff options
-rw-r--r-- | project2/cgi/testCgi.cpp | 6 |
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))); |