|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60162 - in sandbox/SOC/2007/cgi/trunk: boost/cgi boost/cgi/common boost/cgi/detail boost/cgi/fcgi boost/cgi/impl libs/cgi/build/msvc/9.0/Boost.CGI/cgi_ctemplate_cookie_game libs/cgi/build/msvc/9.0/Boost.CGI/cgi_sessions libs/cgi/example/cgi/DebugServer libs/cgi/example/cgi/DebugServer2 libs/cgi/example/fcgi/amortization libs/cgi/example/fcgi/file_browser
From: lists.drrngrvy_at_[hidden]
Date: 2010-03-04 20:54:22
Author: drrngrvy
Date: 2010-03-04 20:54:20 EST (Thu, 04 Mar 2010)
New Revision: 60162
URL: http://svn.boost.org/trac/boost/changeset/60162
Log:
* Only save session when the program_status passed to commit() is zero.
* Stop some "-Wall" warnings.
Tested on XP with MSVC 9.0.
Text files modified:
sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_client.hpp | 5 -----
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/commit.hpp | 3 +--
sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/url_decode.ipp | 7 -------
sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/client.hpp | 15 ---------------
sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/fcgi_request_service.ipp | 8 ++++----
sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_ctemplate_cookie_game/cgi_ctemplate_cookie_game.vcproj | 12 ++++++------
sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_sessions/cgi_sessions.vcproj | 2 +-
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer/hello.cpp | 2 --
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer2/ctemplate.cpp | 3 +--
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/amortization/Jamfile.v2 | 14 ++------------
sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/file_browser/Jamfile.v2 | 19 ++++++-------------
11 files changed, 21 insertions(+), 69 deletions(-)
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_client.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_client.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_client.hpp 2010-03-04 20:54:20 EST (Thu, 04 Mar 2010)
@@ -70,11 +70,6 @@
{
}
- basic_client(io_service& ios)
- //: io_service_(ios)
- {
- }
-
/// Construct the client by claiming a request id.
/**
* Before loading a request, it will usually not have a request id. This
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/common/commit.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/common/commit.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/common/commit.hpp 2010-03-04 20:54:20 EST (Thu, 04 Mar 2010)
@@ -29,9 +29,8 @@
, boost::system::error_code& ec)
{
#ifdef BOOST_CGI_ENABLE_SESSIONS
- if (!req.session.id().empty()) {
+ if (!program_status && !req.session.id().empty())
resp<< cookie(BOOST_CGI_SESSION_COOKIE_NAME, req.session.id());
- }
#endif // BOOST_CGI_ENABLE_SESSIONS
resp.send(req.client(), ec);
return ec ? -1 : req.close(resp.status(), program_status, ec);
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/url_decode.ipp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/url_decode.ipp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/url_decode.ipp 2010-03-04 20:54:20 EST (Thu, 04 Mar 2010)
@@ -14,13 +14,6 @@
BOOST_CGI_NAMESPACE_BEGIN
namespace detail {
- /// Convert a char into a hexadecimal value
- BOOST_CGI_INLINE
- std::string char_to_hex(char const& ch)
- {
- return std::string(); // **FIXME**
- }
-
/// Convert two characters into a single, hex-encoded character
BOOST_CGI_INLINE
char hex_to_char(char const& c1, char const& c2)
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/client.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/client.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/client.hpp 2010-03-04 20:54:20 EST (Thu, 04 Mar 2010)
@@ -54,21 +54,6 @@
{
}
- /// Construct
- template<>
- basic_client<
- ::BOOST_CGI_NAMESPACE::common::tags::fcgi
- >::basic_client(common::io_service& ios)
- : request_id_(-1)
- , status_(none_)
- , total_sent_bytes_(0)
- , total_sent_packets_(0)
- , header_()
- , outbuf_()
- , keep_connection_(false)
- {
- }
-
/// Override basic_client::close().
/**
* Closing a FastCGI means sending an END_REQUEST header
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/fcgi_request_service.ipp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/fcgi_request_service.ipp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/fcgi_request_service.ipp 2010-03-04 20:54:20 EST (Thu, 04 Mar 2010)
@@ -82,7 +82,7 @@
BOOST_CGI_INLINE int
fcgi_request_service::close(
implementation_type& impl
- , ::BOOST_CGI_NAMESPACE::common::http::status_code& hsc
+ , ::BOOST_CGI_NAMESPACE::common::http::status_code&
, int program_status)
{
boost::system::error_code ec;
@@ -94,7 +94,7 @@
BOOST_CGI_INLINE int
fcgi_request_service::close(
implementation_type& impl
- , ::BOOST_CGI_NAMESPACE::common::http::status_code& hsc
+ , ::BOOST_CGI_NAMESPACE::common::http::status_code&
, int program_status
, boost::system::error_code& ec)
{
@@ -512,7 +512,7 @@
// **FIXME**
BOOST_CGI_INLINE void
- fcgi_request_service::handle_admin_request(implementation_type& impl)
+ fcgi_request_service::handle_admin_request(implementation_type& /* impl */)
{
//std::cerr<< std::endl << "**FIXME** " << __FILE__ << ":" << __LINE__
// << " handle_admin_request()" << std::endl;
@@ -520,7 +520,7 @@
// **FIXME**
BOOST_CGI_INLINE void
- fcgi_request_service::handle_other_request_header(implementation_type& impl)
+ fcgi_request_service::handle_other_request_header(implementation_type& /* impl */)
{
//std::cerr<< std::endl << "**FIXME** " << __FILE__ << ":" << __LINE__
// << " handle_other_request_header()" << std::endl;
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_ctemplate_cookie_game/cgi_ctemplate_cookie_game.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_ctemplate_cookie_game/cgi_ctemplate_cookie_game.vcproj (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_ctemplate_cookie_game/cgi_ctemplate_cookie_game.vcproj 2010-03-04 20:54:20 EST (Thu, 04 Mar 2010)
@@ -88,7 +88,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="copy "$(TargetPath)" "c:\code\c++\boost.cgi\cgi-bin\$(TargetName)"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookie_game2\style.css" "c:\code\c++\boost.cgi\htdocs\css\style.css"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookie_game2\main.js" "c:\code\c++\boost.cgi\htdocs\js\style.js"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookie_game2\index.html" "c:\code\c++\boost.cgi\templates\index.html"
"
+ CommandLine="copy "$(TargetPath)" "c:\code\c++\boost.cgi\cgi-bin\$(TargetName)"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookies2\style.css" "c:\code\c++\boost.cgi\htdocs\css\style.css"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookies2\main.js" "c:\code\c++\boost.cgi\htdocs\js\main.js"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookies2\index.html" "c:\code\c++\boost.cgi\templates\index.html"
"
/>
</Configuration>
<Configuration
@@ -164,7 +164,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="copy "$(TargetPath)" "c:\code\c++\boost.cgi\cgi-bin\$(TargetName)"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookie_game2\style.css" "c:\code\c++\boost.cgi\htdocs\css\style.css"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookie_game2\main.js" "c:\code\c++\boost.cgi\htdocs\js\main.js"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookie_game2\index.html" "c:\code\c++\boost.cgi\templates\index.html"
"
+ CommandLine="copy "$(TargetPath)" "c:\code\c++\boost.cgi\cgi-bin\$(TargetName)"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookies2\style.css" "c:\code\c++\boost.cgi\htdocs\css\style.css"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookies2\main.js" "c:\code\c++\boost.cgi\htdocs\js\main.js"
copy "$(SolutionDir)\..\..\..\..\example\cgi\cookies2\index.html" "c:\code\c++\boost.cgi\templates\index.html"
"
/>
</Configuration>
</Configurations>
@@ -177,7 +177,7 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
- RelativePath="..\..\..\..\..\example\cgi\cookie_game2\main.cpp"
+ RelativePath="..\..\..\..\..\example\cgi\cookies2\main.cpp"
>
</File>
</Filter>
@@ -194,15 +194,15 @@
>
</Filter>
<File
- RelativePath="..\..\..\..\..\example\cgi\cookie_game2\index.html"
+ RelativePath="..\..\..\..\..\example\cgi\cookies2\index.html"
>
</File>
<File
- RelativePath="..\..\..\..\..\example\cgi\cookie_game2\main.js"
+ RelativePath="..\..\..\..\..\example\cgi\cookies2\main.js"
>
</File>
<File
- RelativePath="..\..\..\..\..\example\cgi\cookie_game2\style.css"
+ RelativePath="..\..\..\..\..\example\cgi\cookies2\style.css"
>
</File>
</Files>
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_sessions/cgi_sessions.vcproj
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_sessions/cgi_sessions.vcproj (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/build/msvc/9.0/Boost.CGI/cgi_sessions/cgi_sessions.vcproj 2010-03-04 20:54:20 EST (Thu, 04 Mar 2010)
@@ -113,7 +113,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
+ Optimization="3"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;NDEBUG;BOOST_CGI_ENABLE_SESSIONS"
RuntimeLibrary="2"
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer/hello.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer/hello.cpp (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer/hello.cpp 2010-03-04 20:54:20 EST (Thu, 04 Mar 2010)
@@ -5,8 +5,6 @@
// Include the CGI headers.
#include <boost/cgi/cgi.hpp>
-// Include the utilities (ie. has_key)
-#include <boost/cgi/utility.hpp>
// Uses a server class that catches and reports errors in your handler.
#include "TracingServer.hpp"
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer2/ctemplate.cpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer2/ctemplate.cpp (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/cgi/DebugServer2/ctemplate.cpp 2010-03-04 20:54:20 EST (Thu, 04 Mar 2010)
@@ -1,7 +1,6 @@
#include <iostream>
#include <boost/cgi/cgi.hpp>
-#include <boost/cgi/utility.hpp>
#include <ctemplate/template.h>
#include "TracebackServer.hpp"
#include <cmath>
@@ -14,7 +13,7 @@
int cgi_handler(request& req, response& resp)
{
- /*
+ /* Waste time.
for(long i=10000000; i != 0; --i)
{
std::sqrt(123.456L); // waste time
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/amortization/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/amortization/Jamfile.v2 (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/amortization/Jamfile.v2 2010-03-04 20:54:20 EST (Thu, 04 Mar 2010)
@@ -7,24 +7,14 @@
# A symbolic name for this project.
project boost.cgi.examples.fcgi.amortization ;
-import os ;
-
-if [ os.name ] = NT
-{
- lib ctemplate : : <file>c:/cc/src/ctemplate/ctemplate-0.9/Release/libctemplate.lib ;
-}
-else
-{
- lib ctemplate ;
-}
-
exe fcgi_amort
:
main.cpp
/boost/regex/
+
:
- <library>ctemplate
+ <library>/site-config//ctemplate
:
#<linkflags>-lctemplate
;
Modified: sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/file_browser/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/file_browser/Jamfile.v2 (original)
+++ sandbox/SOC/2007/cgi/trunk/libs/cgi/example/fcgi/file_browser/Jamfile.v2 2010-03-04 20:54:20 EST (Thu, 04 Mar 2010)
@@ -1,21 +1,14 @@
-# Copyright (c) 2009 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)
project boost/cgi/example/fcgi/file_browser ;
-exe fcgi_file_browser : main.cpp /boost/regex/ ;
+exe fcgi_file_browser : main.cpp ;
-# Our install rule (builds binaries and copies them to <location>)
install install
- :
- fcgi_file_browser
- :
- <location>$(fcgi-bin)
- ;
+ :
+ fcgi_file_browser
+ :
+ <location>$(fcgi-bin)
+ ;
-# Only install example if you use `bjam install' or equivalent
explicit install ;
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