Boost logo

Boost-Commit :

From: lists.drrngrvy_at_[hidden]
Date: 2007-11-15 20:22:09


Author: drrngrvy
Date: 2007-11-15 20:22:09 EST (Thu, 15 Nov 2007)
New Revision: 41132
URL: http://svn.boost.org/trac/boost/changeset/41132

Log:
minifix
Added:
   sandbox/SOC/2007/cgi/branches/cgi_work/libs/cgi/example/acgi/cookie_game/Jamfile.v2
      - copied unchanged from r41131, /sandbox/SOC/2007/cgi/branches/cgi_work/libs/cgi/example/acgi/Jamfile.v2
   sandbox/SOC/2007/cgi/branches/cgi_work/libs/cgi/example/acgi/cookie_game/main.cpp
      - copied unchanged from r41131, /sandbox/SOC/2007/cgi/branches/cgi_work/libs/cgi/example/acgi/main.cpp
Removed:
   sandbox/SOC/2007/cgi/branches/cgi_work/libs/cgi/example/acgi/Jamfile.v2
   sandbox/SOC/2007/cgi/branches/cgi_work/libs/cgi/example/acgi/main.cpp

Deleted: sandbox/SOC/2007/cgi/branches/cgi_work/libs/cgi/example/acgi/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/cgi/branches/cgi_work/libs/cgi/example/acgi/Jamfile.v2 2007-11-15 20:22:09 EST (Thu, 15 Nov 2007)
+++ (empty file)
@@ -1,34 +0,0 @@
-# Copyright (c) 2007 Darren Garvey
-#
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or copy
-# at http://www.boost.org/LICENSE_1_0.txt)
-
-import os ;
-
-
-local BOOST_ROOT = [ os.environ BOOST_ROOT ] ;
-
-
-SOURCES = main ;
-
-exe acgi
- :
- $(SOURCES).cpp
- : requirements
- <include>$(BOOST_ROOT)
- <include>"../../../../"
- <library>../../util/system//boost_system
- #<library>libboost_system
- <define>BOOST_ALL_NO_LIB=1
- <toolset>gcc:<linkflags>-lpthread
- :
- ;
-
-# uncomment this if you want to test the example with your HTTP server
-#install _
-# : acgi
-# : # this is where the compiled executable is copied to
-# # ie. change this to your server's /cgi-bin/
-# <location>/var/www/cgi-bin
-# ;

Deleted: sandbox/SOC/2007/cgi/branches/cgi_work/libs/cgi/example/acgi/main.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/branches/cgi_work/libs/cgi/example/acgi/main.cpp 2007-11-15 20:22:09 EST (Thu, 15 Nov 2007)
+++ (empty file)
@@ -1,99 +0,0 @@
-#include <boost/cgi/acgi.hpp>
-#include <boost/cgi/response.hpp>
-#include <iostream>
-
-// class handler
-// {
-// public:
-// handler(cgi::request_ostream& ros, cgi::acgi::request& req)
-// : ros_(ros)
-// , req_(req)
-// {
-// }
-//
-// void operator()(boost::system::error_code& ec)
-// {
-// if (!ec)
-// {
-// ros_<< "All ok";
-// ros_.flush(req_);
-// }
-// }
-// private:
-// cgi::request_ostream& ros_;
-// cgi::acgi::request& req_;
-// };
-
-/**
- * The following example has a few simple stages.
- * It is best understood by compiling and testing it, and then looking at
- * the source code.
- */
-
-int main()
-{
- using namespace cgi::acgi;
-
- service srv;
- request req(srv);
-
- // Load up the request data
- req.load(true);
-
- response resp;
-
- if (req.get_("reset") == "true")
- {
- resp<< cookie("name")
- << location("acgi")
- << content_type("text/plain")
- << header();
- resp.send(req);
- return 0;
- }
-
- // First, see if they have a cookie set
- std::string& name = req.cookie_()["name"];
- if (!name.empty())
- {
- resp<< header("Content-type", "text/html")
- << header() // terminate the headers
- << "Hello again " << name << "<p />"
- << "<a href='?reset=true'><input type='submit' value='Reset' /></a>";
- resp.send(req);
- return 0;
- }
-
- // Now we'll check if they sent us a name in a form
- name = req.form_("name");
- if (!name.empty())
- {
- resp<< header("Content-type", "text/html")
- << cookie("name", name)
- << header() // terminate the headers
- << "Hello there, " << "<a href=''>" << name << "</a>";
- resp.send(req);
- return 0;
- }
-
- //std::string buf("Content-type: text/html\r\n\r\nHello there, Universe.<br />");
- //cgi::write(req, cgi::buffer(buf.c_str(), buf.size()));
-
- resp<< header("Content-type", "text/html")
- << header()
- << "Hello there, Universe.<p />"
- << "What's your name?<br />";
-
- //std::cerr<< std::endl << "name = " << req.form_("name") << std::endl;
- //std::cerr.flush();
-
- resp<< "<form method='POST'>"
- "<input name='name' type='text' value='" << req.form_("name") << "'>"
- "</input>"
- "<input type='submit'></input>"
- "</form>";
-
- resp.send(req);
-
- return 0;
-}


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