|
Boost-Commit : |
From: lists.drrngrvy_at_[hidden]
Date: 2008-03-31 16:02:16
Author: drrngrvy
Date: 2008-03-31 16:02:15 EDT (Mon, 31 Mar 2008)
New Revision: 43973
URL: http://svn.boost.org/trac/boost/changeset/43973
Log:
Fixing cookie game example.
Text files modified:
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/acgi/cookie_game/Jamfile.v2 | 7 +++----
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/acgi/cookie_game/main.cpp | 6 +++---
2 files changed, 6 insertions(+), 7 deletions(-)
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/acgi/cookie_game/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/example/acgi/cookie_game/Jamfile.v2 (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/acgi/cookie_game/Jamfile.v2 2008-03-31 16:02:15 EDT (Mon, 31 Mar 2008)
@@ -4,15 +4,14 @@
# (See accompanying file LICENSE_1_0.txt or copy
# at http://www.boost.org/LICENSE_1_0.txt)
-project boost.cgi.examples.acgi.cookie_game
- ;
+project boost/cgi/example/acgi/cookie_game ;
-exe acgi : main.cpp ;
+exe acgi_cookie_game : main.cpp /boost/regex/ ;
# Our install rule (builds binaries and copies them to <location>)
install install
:
- acgi
+ acgi_cookie_game
:
<location>$(cgi-bin)
;
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/acgi/cookie_game/main.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/example/acgi/cookie_game/main.cpp (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/acgi/cookie_game/main.cpp 2008-03-31 16:02:15 EDT (Mon, 31 Mar 2008)
@@ -60,7 +60,7 @@
}
// First, see if they have a cookie set
- std::string& name = req.cookie()["name"];
+ std::string name = req[cookie_data]["name"];
if (!name.empty())
{
resp<< header("Content-type", "text/html")
@@ -71,7 +71,7 @@
}
// Now we'll check if they sent us a name in a form
- name = req.form("name");
+ name = req[form_data]["name"];
if (!name.empty())
{
resp<< header("Content-type", "text/html")
@@ -92,7 +92,7 @@
std::cerr.flush();
resp<< "<form method='POST'>"
- "<input name='name' type='text' value='" << req.form("name") << "'>"
+ "<input name='name' type='text' value='" << req[form_data]["name"] << "'>"
"</input>"
"<input type='submit'></input>"
"</form>"
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk