|
Boost-Commit : |
From: lists.drrngrvy_at_[hidden]
Date: 2008-05-22 10:19:26
Author: drrngrvy
Date: 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
New Revision: 45655
URL: http://svn.boost.org/trac/boost/changeset/45655
Log:
End of spring cleaning (hopefully).
Added:
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/connection_base.hpp
- copied unchanged from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/connection_base.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/is_async.hpp
- copied, changed from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/is_async.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/request_acceptor_service.hpp
- copied, changed from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/request_acceptor_service.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/request_service.hpp
- copied, changed from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/request_service.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/tags.hpp
- copied, changed from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/tags.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/basic_sync_io_object.hpp
- copied, changed from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_sync_io_object.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/
sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/basic_connection_fwd.hpp
- copied unchanged from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_connection_fwd.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/basic_protocol_service_fwd.hpp
- copied, changed from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/common/basic_protocol_service_fwd.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/basic_request_acceptor_fwd.hpp
- copied unchanged from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_acceptor_fwd.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/basic_request_fwd.hpp
- copied, changed from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_fwd.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/io_service_provider_fwd.hpp
- copied, changed from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/common/io_service_provider_fwd.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/request_service_fwd.hpp
- copied unchanged from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/request_service_fwd.hpp
Removed:
sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_client_fwd.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_connection_fwd.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_acceptor_fwd.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_fwd.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_sync_io_object.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/basic_protocol_service_fwd.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/io_service_provider_fwd.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/connection_base.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/is_async.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/request_acceptor_service.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/request_service.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/request_service_fwd.hpp
sandbox/SOC/2007/cgi/trunk/boost/cgi/tags.hpp
Text files modified:
sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/request.hpp | 5 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/request_impl.hpp | 2
sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/request_service.hpp | 6 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/service.hpp | 8 ++--
sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_client.hpp | 2
sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request.hpp | 31 +++++++--------
sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_acceptor.hpp | 2
sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/request.hpp | 4 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/request_impl.hpp | 4 +
sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/request_service.hpp | 11 +++--
sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/service.hpp | 6 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/basic_protocol_service.hpp | 4 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/form_parser.hpp | 5 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/io_service_provider.hpp | 2
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/is_async.hpp | 39 +++++++++++--------
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/request_acceptor_service.hpp | 6 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/request_service.hpp | 4 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/response.hpp | 2
sandbox/SOC/2007/cgi/trunk/boost/cgi/common/tags.hpp | 56 ++++++++++++++-------------
sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/async_stdio.hpp | 6 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/shareable_tcp_socket.hpp | 6 +--
sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/stdio.hpp | 10 ++--
sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/tcp_socket.hpp | 4 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/basic_sync_io_object.hpp | 13 +++---
sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/cgi_request_impl_base.hpp | 8 ++--
sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/protocol_traits.hpp | 66 +++++++++++++++++++++-----------
sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/url_decode.ipp | 40 +++++++++++---------
sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/acceptor_service_impl.hpp | 4 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/client.hpp | 6 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/request.hpp | 7 +--
sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/request_acceptor_service.hpp | 6 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/request_service.hpp | 5 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/service.hpp | 4 +-
sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/basic_protocol_service_fwd.hpp | 2
sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/basic_request_fwd.hpp | 6 +--
sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/io_service_provider_fwd.hpp | 2
sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/form_parser.ipp | 2
sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/response.ipp | 80 +++++++++++++++++++--------------------
38 files changed, 251 insertions(+), 225 deletions(-)
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/request.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/request.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/request.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -9,12 +9,11 @@
#ifndef CGI_ACGI_REQUEST_HPP_INCLUDED__
#define CGI_ACGI_REQUEST_HPP_INCLUDED__
+#include "boost/cgi/common/tags.hpp"
#include "boost/cgi/acgi/service.hpp"
#include "boost/cgi/acgi/request_impl.hpp"
#include "boost/cgi/acgi/request_service.hpp"
-#include "boost/cgi/tags.hpp"
-#include "boost/cgi/basic_request_fwd.hpp"
-#include "boost/cgi/acgi/request_impl.hpp"
+#include "boost/cgi/fwd/basic_request_fwd.hpp"
namespace cgi {
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/request_impl.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/request_impl.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/request_impl.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -30,7 +30,7 @@
typedef common::async_stdio_connection connection_type;
typedef
::cgi::common::basic_client<
- connection_type, tags::acgi
+ connection_type, common::tags::acgi
>
client_type;
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/request_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/request_service.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/request_service.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -9,7 +9,7 @@
#ifndef CGI_ACGI_SERVICE_IMPL_HPP_INCLUDED__
#define CGI_ACGI_SERVICE_IMPL_HPP_INCLUDED__
-#include "boost/cgi/tags.hpp"
+#include "boost/cgi/common/tags.hpp"
#include "boost/cgi/common/map.hpp"
#include "boost/cgi/acgi/request_impl.hpp"
#include "boost/cgi/import/io_service.hpp"
@@ -28,13 +28,13 @@
{
public:
typedef acgi_request_service type;
- typedef tags::acgi protocol_type;
+ typedef common::tags::acgi protocol_type;
typedef acgi_service protocol_service_type;
/// The unique service identifier
// static boost::asio::io_service::id id;
- acgi_request_service(::cgi::common::io_service& ios)
+ acgi_request_service(common::io_service& ios)
: detail::service_base<acgi_request_service>(ios)
{
}
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/service.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/acgi/service.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -9,8 +9,8 @@
#ifndef CGI_CGI_SERVICE_HPP_INCLUDED__
#define CGI_CGI_SERVICE_HPP_INCLUDED__
-#include "boost/cgi/common/basic_protocol_service_fwd.hpp" // order matters
-#include "boost/cgi/tags.hpp"
+#include "boost/cgi/common/tags.hpp"
+#include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
namespace cgi {
@@ -18,10 +18,10 @@
/**
* Works with both cgi_request and acgi_request.
*/
- typedef common::basic_protocol_service<tags::acgi> acgi_service;
+ typedef common::basic_protocol_service<common::tags::acgi> acgi_service;
namespace acgi {
- typedef common::basic_protocol_service<tags::acgi> service;
+ typedef common::basic_protocol_service<common::tags::acgi> service;
}
/// A service 'owned' by a single user-supplied io_service
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 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -12,9 +12,9 @@
#include <boost/shared_ptr.hpp>
///////////////////////////////////////////////////////////
#include "boost/cgi/common/map.hpp"
+#include "boost/cgi/http/status_code.hpp"
#include "boost/cgi/common/role_type.hpp"
#include "boost/cgi/common/status_type.hpp"
-#include "boost/cgi/http/status_code.hpp"
#include "boost/cgi/connections/tcp_socket.hpp"
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_client_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_client_fwd.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
+++ (empty file)
@@ -1,22 +0,0 @@
-// -- basic_client_fwd.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// 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)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_BASIC_CLIENT_FWD_HPP_INCLUDED__
-#define CGI_BASIC_CLIENT_FWD_HPP_INCLUDED__
-
-namespace cgi {
- namespace common {
-
- template<typename Connection, typename Protocol>
- class basic_client;
-
- } // namespace common
-} // namespace cgi
-
-#endif // CGI_BASIC_CLIENT_FWD_HPP_INCLUDED__
-
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_connection_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_connection_fwd.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
+++ (empty file)
@@ -1,21 +0,0 @@
-// -- basic_connection_fwd.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// 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)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_BASIC_CONNECTION_FWD_HPP_INCLUDED__
-#define CGI_BASIC_CONNECTION_FWD_HPP_INCLUDED__
-
-namespace cgi {
- namespace common {
-
- template<typename ConnectionType>
- class basic_connection;
-
- } // namespace common
-} // namespace cgi
-
-#endif // CGI_BASIC_CONNECTION_FWD_HPP_INCLUDED__
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -25,20 +25,19 @@
#include <boost/asio/basic_io_object.hpp>
///////////////////////////////////////////////////////////
// **FIXME** Half of these are probably useless
-#include "boost/cgi/is_async.hpp"
#include "boost/cgi/common/map.hpp"
-#include "boost/cgi/connection_base.hpp"
-#include "boost/cgi/request_service.hpp"
+#include "boost/cgi/common/is_async.hpp"
#include "boost/cgi/common/role_type.hpp"
#include "boost/cgi/http/status_code.hpp"
-#include "boost/cgi/basic_request_fwd.hpp"
#include "boost/cgi/detail/throw_error.hpp"
#include "boost/cgi/common/status_type.hpp"
#include "boost/cgi/common/source_enums.hpp"
-#include "boost/cgi/basic_sync_io_object.hpp"
+#include "boost/cgi/fwd/basic_request_fwd.hpp"
+#include "boost/cgi/common/request_service.hpp"
#include "boost/cgi/import/basic_io_object.hpp"
#include "boost/cgi/detail/protocol_traits.hpp"
-#include "boost/cgi/common/basic_protocol_service_fwd.hpp"
+#include "boost/cgi/detail/basic_sync_io_object.hpp"
+#include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
namespace cgi {
namespace common {
@@ -72,11 +71,11 @@
, role_type Role
, typename Allocator>
class basic_request
- : //public request_base
- public boost::mpl::if_c<is_async<typename RequestService::protocol_type>::value
- , basic_io_object<RequestService>
- , basic_sync_io_object<RequestService>
- >::type
+ : public boost::mpl::if_c<
+ is_async<typename RequestService::protocol_type>::type::value
+ , basic_io_object<RequestService>
+ , detail::basic_sync_io_object<RequestService>
+ >::type
{
public:
typedef basic_request<RequestService, ProtocolService
@@ -94,7 +93,7 @@
// Throws
basic_request(bool load_now = true, bool parse_post = true)
- : basic_sync_io_object<service_type>()
+ : detail::basic_sync_io_object<service_type>()
{
if (load_now) load(parse_post);//this->service.load(this->implementation, true, ec);
}
@@ -103,7 +102,7 @@
basic_request(boost::system::error_code& ec
, const bool load_now = true
, const bool parse_post = true)
- : basic_sync_io_object<service_type>()
+ : detail::basic_sync_io_object<service_type>()
{
if (load_now) load(ec, parse_post);//this->service.load(this->implementation, true, ec);
}
@@ -214,7 +213,7 @@
*
* @returns The value of program_status
*/
- int close(http::status_code http_status = http::ok
+ int close(common::http::status_code http_status = http::ok
, int program_status = 0)
{
//BOOST_ASSERT( request_status_ != status_type::ended );
@@ -224,7 +223,7 @@
, program_status);
}
- int close(http::status_code http_status
+ int close(common::http::status_code http_status
, int program_status
, boost::system::error_code& ec)
{
@@ -384,7 +383,7 @@
return this->service.get_role(this->implementation);
}
- void set_status(http::status_code const& status)
+ void set_status(common::http::status_code const& status)
{
this->service.set_status(this->implementation, status);
}
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_acceptor.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_acceptor.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_acceptor.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -16,7 +16,7 @@
#include <boost/asio/ip/basic_endpoint.hpp>
///////////////////////////////////////////////////////////
#include "boost/cgi/detail/throw_error.hpp"
-#include <boost/cgi/common/basic_protocol_service.hpp>
+#include "boost/cgi/common/basic_protocol_service.hpp"
namespace cgi {
namespace common {
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_acceptor_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_acceptor_fwd.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
+++ (empty file)
@@ -1,19 +0,0 @@
-// -- basic_acceptor_fwd.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// 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)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_BASIC_ACCEPTOR_FWD_HPP_INCLUDED__
-#define CGI_BASIC_ACCEPTOR_FWD_HPP_INCLUDED__
-
-namespace cgi {
-
- template<typename>
- class basic_acceptor;
-
-} // namespace cgi
-
-#endif // CGI_BASIC_ACCEPTOR_FWD_HPP_INCLUDED__
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_fwd.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
+++ (empty file)
@@ -1,31 +0,0 @@
-// -- basic_request_fwd.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// 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)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_BASIC_REQUEST_FWD_HPP_INCLUDED__
-#define CGI_BASIC_REQUEST_FWD_HPP_INCLUDED__
-
-#include <memory>
-///////////////////////////////////////////////////////////
-#include "boost/cgi/common/role_type.hpp"
-#include "boost/cgi/request_service_fwd.hpp"
-#include "boost/cgi/common/basic_protocol_service_fwd.hpp"
-
-namespace cgi {
- namespace common {
-
- template<typename RequestService
- , typename ProtocolService
- , enum role_type Role = responder
- , typename Allocator = std::allocator<char> >
- class basic_request;
-
- } // namespace common
-} // namespace cgi
-
-#endif // CGI_BASIC_REQUEST_FWD_HPP_INCLUDED__
-
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_sync_io_object.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_sync_io_object.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
+++ (empty file)
@@ -1,44 +0,0 @@
-// -- basic_sync_io_object.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// 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)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_BASIC_SYNC_IO_OBJECT_HPP_INCLUDED__
-#define CGI_BASIC_SYNC_IO_OBJECT_HPP_INCLUDED__
-
-#include <boost/noncopyable.hpp>
-
-namespace cgi {
- namespace common {
-
- /// basic_io_object alternative when an io_service isn't used
- template<typename Service>
- class basic_sync_io_object
- : private boost::noncopyable
- {
- public:
- typedef Service service_type;
- typedef typename Service::implementation_type implementation_type;
-
- protected:
- explicit basic_sync_io_object()
- {
- service.construct(implementation);
- }
-
- ~basic_sync_io_object()
- {
- service.destroy(implementation);
- }
-
- service_type service;
- implementation_type implementation;
- };
-
- } // namespace common
-} // namespace cgi
-
-#endif // CGI_BASIC_SYNC_IO_OBJECT_HPP_INCLUDED__
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/request.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/request.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/request.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -11,8 +11,8 @@
#include "service.hpp"
#include "request_service.hpp"
-#include "boost/cgi/tags.hpp"
-#include "boost/cgi/basic_request_fwd.hpp"
+#include "boost/cgi/common/tags.hpp"
+#include "boost/cgi/fwd/basic_request_fwd.hpp"
#include "boost/cgi/cgi/request_impl.hpp"
#include "boost/cgi/basic_request.hpp"
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/request_impl.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/request_impl.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/request_impl.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -42,7 +42,9 @@
: public detail::cgi_request_impl_base<common::stdio_connection>
{
public:
- typedef ::cgi::common::basic_client<common::stdio_connection, tags::cgi> client_type;
+ typedef common::basic_client<
+ common::stdio_connection, common::tags::cgi
+ > client_type;
/// Constructor
/**
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/request_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/request_service.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/request_service.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -9,14 +9,15 @@
#ifndef CGI_CGI_SERVICE_IMPL_HPP_INCLUDED__
#define CGI_CGI_SERVICE_IMPL_HPP_INCLUDED__
-#include <string>
#include <map>
+#include <string>
+///////////////////////////////////////////////////////////
#include <boost/system/error_code.hpp>
-
+///////////////////////////////////////////////////////////
#include "boost/cgi/cgi/request_impl.hpp"
-#include "boost/cgi/detail/cgi_service_impl_base.hpp"
-#include "boost/cgi/detail/extract_params.hpp"
#include "boost/cgi/connections/stdio.hpp"
+#include "boost/cgi/detail/extract_params.hpp"
+#include "boost/cgi/detail/cgi_service_impl_base.hpp"
namespace cgi {
@@ -28,7 +29,7 @@
{
public:
typedef cgi_request_impl impl_type;
- typedef tags::cgi protocol_type;
+ typedef common::tags::cgi protocol_type;
cgi_request_service()
: cgi_service_impl_base<cgi_request_impl>()
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/service.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/cgi/service.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -9,10 +9,10 @@
#ifndef CGI_CGI_SERVICE_HPP_INCLUDED__
#define CGI_CGI_SERVICE_HPP_INCLUDED__
-#include "boost/cgi/tags.hpp"
+#include "boost/cgi/common/tags.hpp"
#include "boost/cgi/connections/stdio.hpp"
#include "boost/cgi/connections/async_stdio.hpp"
-#include "boost/cgi/common/basic_protocol_service_fwd.hpp"
+#include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
namespace cgi {
@@ -20,7 +20,7 @@
/**
* Works with both cgi_request and acgi_request.
*/
- typedef common::basic_protocol_service<tags::acgi> cgi_service;
+ typedef common::basic_protocol_service<common::tags::acgi> cgi_service;
/// A service 'owned' by a single user-supplied io_service
//typedef basic_protocol_service<tags::acgi> cgi_sub_service;
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/common/basic_protocol_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/common/basic_protocol_service.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/common/basic_protocol_service.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -17,10 +17,10 @@
#include <boost/detail/workaround.hpp>
///////////////////////////////////////////////////////////
#include "boost/cgi/import/io_service.hpp"
-#include "boost/cgi/basic_request_fwd.hpp"
+#include "boost/cgi/fwd/basic_request_fwd.hpp"
#include "boost/cgi/detail/protocol_traits.hpp"
#include "boost/cgi/common/io_service_provider.hpp"
-#include "boost/cgi/common/basic_protocol_service_fwd.hpp"
+#include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
namespace cgi {
namespace common {
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/common/basic_protocol_service_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/common/basic_protocol_service_fwd.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
+++ (empty file)
@@ -1,31 +0,0 @@
-// -- basic_protocol_service_fwd.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// 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)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_BASIC_PROTOCOL_SERVICE_FWD_HPP_INCLUDED__
-#define CGI_BASIC_PROTOCOL_SERVICE_FWD_HPP_INCLUDED__
-
-#if _MSC_VER > 1020
-#pragma once
-#endif
-
-#include "boost/cgi/common/io_service_provider_fwd.hpp"
-
-namespace cgi {
- namespace common {
-
- template<
- typename Protocol,
- typename IoServiceProvider = common::io_service_provider<>
- >
- class basic_protocol_service;
-
- } // namespace common
-} // namespace cgi
-
-#endif // CGI_BASIC_PROTOCOL_SERVICE_FWD_HPP_INCLUDED__
-
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/common/form_parser.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/common/form_parser.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/common/form_parser.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -17,10 +17,9 @@
#include <string>
///////////////////////////////////////////////////////////
#include <boost/regex.hpp>
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/error.hpp>
#include <boost/function.hpp>
-#include <boost/system/error_code.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/buffer.hpp>
#include <boost/algorithm/string/find.hpp>
///////////////////////////////////////////////////////////
#include "boost/cgi/common/map.hpp"
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/common/io_service_provider.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/common/io_service_provider.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/common/io_service_provider.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -18,7 +18,7 @@
#include <boost/noncopyable.hpp>
///////////////////////////////////////////////////////////
#include "boost/cgi/import/io_service.hpp"
-#include "boost/cgi/common/io_service_provider_fwd.hpp"
+#include "boost/cgi/fwd/io_service_provider_fwd.hpp"
namespace cgi {
namespace common {
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/common/io_service_provider_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/common/io_service_provider_fwd.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
+++ (empty file)
@@ -1,28 +0,0 @@
-// -- io_service_provider_fwd.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// 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)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_IO_SERVICE_PROVIDER_FWD_HPP_INCLUDED__
-#define CGI_IO_SERVICE_PROVIDER_FWD_HPP_INCLUDED__
-
-#if _MSC_VER > 1020
-#pragma once
-#endif
-
-#include "boost/cgi/tags.hpp"
-
-namespace cgi {
- namespace common {
-
- template<typename = tags::single_service>
- class io_service_provider;
-
- } // namespace common
-} // namespace cgi
-
-#endif // CGI_IO_SERVICE_PROVIDER_FWD_HPP_INCLUDED__
-
Copied: sandbox/SOC/2007/cgi/trunk/boost/cgi/common/is_async.hpp (from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/is_async.hpp)
==============================================================================
--- /sandbox/SOC/2007/cgi/trunk/boost/cgi/is_async.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/common/is_async.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -1,4 +1,4 @@
-// -- is_async.hpp --
+// -- common/is_async.hpp --
//
// Copyright (c) Darren Garvey 2007.
// Distributed under the Boost Software License, Version 1.0.
@@ -6,27 +6,32 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
////////////////////////////////////////////////////////////////
-#ifndef CGI_IS_ASYNC_HPP_INCLUDED__
-#define CGI_IS_ASYNC_HPP_INCLUDED__
+#ifndef CGI_COMMON_IS_ASYNC_HPP_INCLUDED__
+#define CGI_COMMON_IS_ASYNC_HPP_INCLUDED__
#include <boost/mpl/bool.hpp>
-
-#include "tags.hpp"
+///////////////////////////////////////////////////////////
+#include "boost/cgi/common/tags.hpp"
namespace cgi {
+ namespace common {
- template<typename Protocol>
- struct is_async
- : boost::mpl::bool_<true>::type
- {
- };
-
- template<>
- struct is_async<tags::cgi>
- : boost::mpl::bool_<false>::type
- {
- };
+ template<typename Protocol>
+ struct is_async
+ : boost::mpl::bool_<true>
+ {
+ //typedef boost::mpl::bool_<true>::type::value value;
+ };
+
+ template<>
+ struct is_async<tags::cgi>
+ : boost::mpl::bool_<false>
+ {
+ //typedef boost::mpl::bool_<false>::type::value value;
+ };
+ } // namespace common
} // namespace cgi
-#endif // CGI_IS_ASYNC_HPP_INCLUDED__
+#endif // CGI_COMMON_IS_ASYNC_HPP_INCLUDED__
+
Copied: sandbox/SOC/2007/cgi/trunk/boost/cgi/common/request_acceptor_service.hpp (from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/request_acceptor_service.hpp)
==============================================================================
--- /sandbox/SOC/2007/cgi/trunk/boost/cgi/request_acceptor_service.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/common/request_acceptor_service.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -9,9 +9,9 @@
#ifndef CGI_REQUEST_ACCEPTOR_SERVICE_HPP_INCLUDED
#define CGI_REQUEST_ACCEPTOR_SERVICE_HPP_INCLUDED
-#include "detail/throw_error.hpp"
-#include "detail/protocol_traits.hpp"
-#include "detail/service_base.hpp"
+#include "boost/cgi/detail/throw_error.hpp"
+#include "boost/cgi/detail/service_base.hpp"
+#include "boost/cgi/detail/protocol_traits.hpp"
namespace cgi {
Copied: sandbox/SOC/2007/cgi/trunk/boost/cgi/common/request_service.hpp (from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/request_service.hpp)
==============================================================================
--- /sandbox/SOC/2007/cgi/trunk/boost/cgi/request_service.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/common/request_service.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -14,9 +14,9 @@
#include <boost/utility/enable_if.hpp>
///////////////////////////////////////////////////////////
#include "boost/cgi/import/io_service.hpp"
-#include "boost/cgi/detail/protocol_traits.hpp"
-#include "boost/cgi/common/basic_protocol_service_fwd.hpp"
#include "boost/cgi/detail/service_base.hpp"
+#include "boost/cgi/detail/protocol_traits.hpp"
+#include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
namespace cgi {
namespace common {
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/common/response.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/common/response.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/common/response.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -21,8 +21,8 @@
#include "boost/cgi/common/header.hpp"
#include "boost/cgi/http/status_code.hpp"
#include "boost/cgi/import/streambuf.hpp"
-#include "boost/cgi/basic_request_fwd.hpp"
#include "boost/cgi/detail/throw_error.hpp"
+#include "boost/cgi/fwd/basic_request_fwd.hpp"
/// This mess outputs a default Content-type header if the user hasn't set any.
/** **FIXME** Not implemented; not sure if it should be...
Copied: sandbox/SOC/2007/cgi/trunk/boost/cgi/common/tags.hpp (from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/tags.hpp)
==============================================================================
--- /sandbox/SOC/2007/cgi/trunk/boost/cgi/tags.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/common/tags.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -1,4 +1,4 @@
-// -- tags.hpp --
+// -- common/tags.hpp --
//
// Copyright (c) Darren Garvey 2007.
// Distributed under the Boost Software License, Version 1.0.
@@ -6,45 +6,47 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
////////////////////////////////////////////////////////////////
-#ifndef CGI_TAGS_HPP_INCLUDED__
-#define CGI_TAGS_HPP_INCLUDED__
+#ifndef CGI_COMMON_TAGS_HPP_INCLUDED__
+#define CGI_COMMON_TAGS_HPP_INCLUDED__
#if _MSC_VER > 1020
#pragma once
#endif
namespace cgi {
+ namespace common {
- /// SCGI (note, this must be removed)
+ /// SCGI (note, this must be removed)
struct scgi_{};
- /// FastCGI
+ /// FastCGI
struct fcgi_{};
- namespace tags {
+ namespace tags {
- // the null tag type
- struct null {};
+ // the null tag type
+ struct null {};
- // protocol types
- struct cgi {};
- struct async_cgi {}; // call it acgi?
- struct acgi {};
- struct fcgi {};
- struct scgi {};
-
- // IoServiceProvider PoolingPolicy types
- struct single_service {};
- struct service_pool {};
- struct round_robin {};
-
- // Connection types
- struct stdio {};
- struct async_stdio {};
- struct tcp_socket {};
- // A shareable tcp_socket (ie. one that can be locked)
- struct shareable_tcp_socket {};
+ // protocol types
+ struct cgi {};
+ struct async_cgi {}; // call it acgi?
+ struct acgi {};
+ struct fcgi {};
+ struct scgi {};
+
+ // IoServiceProvider PoolingPolicy types
+ struct single_service {};
+ struct service_pool {};
+ struct round_robin {};
+
+ // Connection types
+ struct stdio {};
+ struct async_stdio {};
+ struct tcp_socket {};
+ // A shareable tcp_socket (ie. one that can be locked)
+ struct shareable_tcp_socket {};
- } // namespace tags
+ } // namespace tags
+ } // namespace common
} // namespace cgi
#endif // CGI_TAGS_HPP_INCLUDED__
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/connection_base.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/connection_base.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
+++ (empty file)
@@ -1,40 +0,0 @@
-// -- connection_base.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// 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)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_CONNECTION_BASE_HPP_INCLUDED__
-#define CGI_CONNECTION_BASE_HPP_INCLUDED__
-
-namespace cgi {
-
- /// Abstract Base Class for all connection types
- class connection_base
- {
- public:
- virtual ~connection_base() {}
-
- // read functions
- //template<typename MutableBufferSequence>
- //virtual std::size_t read(MutableBufferSequence) = 0;
-
- //template<typename MutableBufferSequence, typename Handler>
- //virtual void async_read(MutableBufferSequence, Handler) = 0;
-
- // write functions
- //template<typename ConstBufferSequence>
- //virtual std::size_t write(ConstBufferSequence) = 0;
-
- //template<typename ConstBufferSequence, typename Handler>
- //virtual void async_write(ConstBufferSequence, Handler) = 0;
-
- protected:
- //~connection_base() { }
- };
-
-} // namespace cgi
-
-#endif // CGI_CONNECTION_BASE_HPP_INCLUDED__
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/async_stdio.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/async_stdio.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/async_stdio.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -13,10 +13,10 @@
#include <boost/shared_ptr.hpp>
#include <boost/system/error_code.hpp>
#include <boost/enable_shared_from_this.hpp>
-
+///////////////////////////////////////////////////////////
+#include "boost/cgi/common/tags.hpp"
#include "boost/cgi/connections/stdio.hpp"
#include "boost/cgi/import/io_service.hpp"
-#include "boost/cgi/tags.hpp"
namespace cgi {
namespace common {
@@ -31,7 +31,7 @@
typedef basic_connection<tags::async_stdio> type;
typedef boost::shared_ptr<type> pointer;
- basic_connection(::cgi::common::io_service& ios)
+ basic_connection(common::io_service& ios)
: basic_connection<tags::stdio>()
, io_service_(ios)
{
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/shareable_tcp_socket.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/shareable_tcp_socket.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/shareable_tcp_socket.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -18,15 +18,13 @@
#include <boost/shared_ptr.hpp>
#include <boost/thread.hpp>
///////////////////////////////////////////////////////////
-#include "boost/cgi/tags.hpp"
#include "boost/cgi/error.hpp"
-#include "boost/cgi/connection_base.hpp"
+#include "boost/cgi/common/tags.hpp"
#include "boost/cgi/basic_connection.hpp"
#include "boost/cgi/import/io_service.hpp"
#include "boost/cgi/detail/push_options.hpp"
+#include "boost/cgi/common/connection_base.hpp"
-//#include "boost/cgi/fcgi/client_fwd.hpp"
-//#include "boost/cgi/fcgi/request_fwd.hpp"
#include "boost/cgi/detail/protocol_traits.hpp"
namespace cgi {
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/stdio.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/stdio.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/stdio.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -11,14 +11,14 @@
#include <cstdio>
#include <string>
+///////////////////////////////////////////////////////////
#include <boost/system/error_code.hpp>
#include <boost/asio.hpp>
-
-#include "boost/cgi/basic_connection_fwd.hpp"
-#include "boost/cgi/tags.hpp"
-#include "boost/cgi/connection_base.hpp"
+///////////////////////////////////////////////////////////
#include "boost/cgi/error.hpp"
-//#include "boost/cgi/io_service.hpp"
+#include "boost/cgi/common/tags.hpp"
+#include "boost/cgi/common/connection_base.hpp"
+#include "boost/cgi/fwd/basic_connection_fwd.hpp"
namespace cgi {
namespace common {
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/tcp_socket.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/tcp_socket.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/tcp_socket.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -12,8 +12,8 @@
#include <boost/shared_ptr.hpp>
#include <boost/asio/ip/tcp.hpp>
///////////////////////////////////////////////////////////
-#include "boost/cgi/tags.hpp"
-#include "boost/cgi/connection_base.hpp"
+#include "boost/cgi/common/tags.hpp"
+#include "boost/cgi/common/connection_base.hpp"
#include "boost/cgi/basic_connection.hpp"
#include "boost/cgi/import/io_service.hpp"
#include "boost/cgi/detail/push_options.hpp"
Copied: sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/basic_sync_io_object.hpp (from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_sync_io_object.hpp)
==============================================================================
--- /sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_sync_io_object.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/basic_sync_io_object.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -1,4 +1,4 @@
-// -- basic_sync_io_object.hpp --
+// -- detail/basic_sync_io_object.hpp --
//
// Copyright (c) Darren Garvey 2007.
// Distributed under the Boost Software License, Version 1.0.
@@ -6,13 +6,13 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
////////////////////////////////////////////////////////////////
-#ifndef CGI_BASIC_SYNC_IO_OBJECT_HPP_INCLUDED__
-#define CGI_BASIC_SYNC_IO_OBJECT_HPP_INCLUDED__
+#ifndef CGI_DETAIL_BASIC_SYNC_IO_OBJECT_HPP_INCLUDED__
+#define CGI_DETAIL_BASIC_SYNC_IO_OBJECT_HPP_INCLUDED__
#include <boost/noncopyable.hpp>
namespace cgi {
- namespace common {
+ namespace detail {
/// basic_io_object alternative when an io_service isn't used
template<typename Service>
@@ -38,7 +38,8 @@
implementation_type implementation;
};
- } // namespace common
+ } // namespace detail
} // namespace cgi
-#endif // CGI_BASIC_SYNC_IO_OBJECT_HPP_INCLUDED__
+#endif // CGI_DETAIL_BASIC_SYNC_IO_OBJECT_HPP_INCLUDED__
+
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/cgi_request_impl_base.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/cgi_request_impl_base.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/cgi_request_impl_base.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -42,11 +42,11 @@
{
public:
- typedef ::cgi::common::map map_type;
- typedef Connection connection_type;
+ typedef ::cgi::common::map map_type;
+ typedef Connection connection_type;
typedef
- common::basic_client<Connection, tags::acgi> client_type;
- typedef typename connection_type::pointer conn_ptr;
+ common::basic_client<Connection, common::tags::acgi> client_type;
+ typedef typename connection_type::pointer conn_ptr;
/// Constructor
cgi_request_impl_base()
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/protocol_traits.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/protocol_traits.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/protocol_traits.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -18,10 +18,10 @@
#include <boost/shared_ptr.hpp>
///////////////////////////////////////////////////////////
-#include "boost/cgi/common/basic_protocol_service_fwd.hpp"
-#include "boost/cgi/tags.hpp"
-#include "boost/cgi/basic_request_fwd.hpp"
-#include "boost/cgi/basic_connection_fwd.hpp"
+#include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
+#include "boost/cgi/common/tags.hpp"
+#include "boost/cgi/fwd/basic_request_fwd.hpp"
+#include "boost/cgi/fwd/basic_connection_fwd.hpp"
namespace cgi {
@@ -79,6 +79,8 @@
namespace detail {
+ namespace tags = ::cgi::common::tags;
+
template<typename Protocol>
struct protocol_traits
{
@@ -90,12 +92,15 @@
typedef protocol_traits<tags::cgi> type;
typedef cgi_request_impl impl_type;
typedef cgi_request_service request_service_impl;
- typedef common::basic_protocol_service<tags::cgi> protocol_service_type;
+ typedef common::basic_protocol_service<
+ tags::cgi
+ > protocol_service_type;
typedef common::basic_request<
- request_service_impl, protocol_service_type
- > request_type;
+ request_service_impl
+ , protocol_service_type
+ > request_type;
typedef cgi_service_impl service_impl_type;
- typedef common::basic_connection<tags::stdio> connection_type;
+ typedef common::basic_connection<tags::stdio> connection_type;
// typedef cgi_gateway_impl gateway_impl_type;
// typedef cgi_gateway_service gateway_service_impl_type;
};
@@ -106,12 +111,17 @@
typedef protocol_traits<tags::async_cgi> type;
typedef async_cgi_request_impl impl_type;
typedef acgi_request_service request_service_impl;
- typedef common::basic_protocol_service<tags::acgi> protocol_service_type;
+ typedef common::basic_protocol_service<
+ tags::acgi
+ > protocol_service_type;
typedef common::basic_request<
- request_service_impl, protocol_service_type
- > request_type;
+ request_service_impl
+ , protocol_service_type
+ > request_type;
typedef async_cgi_service_impl service_impl_type;
- typedef common::basic_connection<tags::async_stdio> connection_type;
+ typedef common::basic_connection<
+ tags::async_stdio
+ > connection_type;
typedef async_cgi_gateway_impl gateway_impl_type;
typedef async_cgi_gateway_service gateway_service_type;
};
@@ -123,12 +133,17 @@
typedef protocol_traits<tags::acgi> type;
typedef acgi_request_impl impl_type;
typedef acgi_request_service request_service_impl;
- typedef common::basic_protocol_service<tags::acgi> protocol_service_type;
+ typedef common::basic_protocol_service<
+ tags::acgi
+ > protocol_service_type;
typedef common::basic_request<
- request_service_impl, protocol_service_type
- > request_type;
+ request_service_impl
+ , protocol_service_type
+ > request_type;
typedef acgi_service_impl service_impl_type;
- typedef common::basic_connection<tags::async_stdio> connection_type;
+ typedef common::basic_connection<
+ tags::async_stdio
+ > connection_type;
typedef acgi_gateway_impl gateway_impl_type;
typedef acgi_gateway_service gateway_service_type;
};
@@ -139,18 +154,21 @@
typedef protocol_traits<tags::fcgi> type;
typedef fcgi::fcgi_request_impl impl_type;
typedef fcgi::fcgi_request_service request_service_impl;
- typedef common::basic_protocol_service<fcgi_> protocol_service_type;
+ typedef common::basic_protocol_service<
+ common::fcgi_
+ > protocol_service_type;
typedef common::basic_request<
- request_service_impl, protocol_service_type
- > request_type;
+ request_service_impl
+ , protocol_service_type
+ > request_type;
typedef boost::shared_ptr<request_type> request_ptr;
//typedef fcgi_request_service
// ::implementation_type request_impl_type;
typedef fcgi::fcgi_service_impl service_impl_type;
typedef fcgi::fcgi_acceptor_service acceptor_service_impl;
typedef common::basic_connection<
- tags::shareable_tcp_socket
- > connection_type;
+ tags::shareable_tcp_socket
+ > connection_type;
//typedef fcgi_gateway_impl gateway_impl_type;
//typedef fcgi_gateway_service gateway_service_type;
};
@@ -172,14 +190,16 @@
//typedef scgi_gateway_service gateway_service_type;
};
+ // **FIXME** (remove)
template<>
- struct protocol_traits< ::cgi::scgi_>
+ struct protocol_traits< ::cgi::common::scgi_>
: protocol_traits<tags::scgi>
{
};
+ // **FIXME** (remove)
template<>
- struct protocol_traits< ::cgi::fcgi_>
+ struct protocol_traits< ::cgi::common::fcgi_>
: protocol_traits<tags::fcgi>
{
};
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 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -15,13 +15,15 @@
namespace detail {
/// Convert a char into a hexadecimal value
- BOOST_CGI_INLINE std::string char_to_hex(char const& ch)
+ 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)
+ BOOST_CGI_INLINE
+ char hex_to_char(char const& c1, char const& c2)
{
int ret ( ( std::isalpha(c1)
? ((c1 & 0xdf) - 'A') + 10
@@ -39,7 +41,8 @@
/// Take two characters (a hex sequence) and return a char
// **DEPRECATED**
- BOOST_CGI_INLINE char url_decode( const char& c1, const char& c2 )
+ BOOST_CGI_INLINE
+ char url_decode( const char& c1, const char& c2 )
{
int ret = ( (c1 >= 'A' && c1 <= 'Z') || (c1 >= 'a' && c1 <= 'z')
? ((c1 & 0xdf) - 'A') + 10
@@ -55,12 +58,13 @@
}
/// URL-decode a string
- BOOST_CGI_INLINE std::string url_decode( const std::string& str )
+ BOOST_CGI_INLINE
+ std::string url_decode( const std::string& str )
{
- typedef std::string string_type;
- string_type ret;
+ typedef std::string string_type; // Ahem.
+ string_type result;
- for( string_type::const_iterator iter = str.begin(), end = str.end()
+ for( string_type::const_iterator iter (str.begin()), end (str.end())
; iter != end; ++iter )
{
switch( *iter )
@@ -68,28 +72,28 @@
case ' ':
break;
case '+':
- ret.append(1, ' ');
+ result.append(1, ' ');
break;
case '%':
- if (std::distance(iter, end) >= 2
- && std::isxdigit(*(iter+1))
- && std::isxdigit(*(iter+2)))
+ if (std::distance(iter, end) <= 2
+ || !std::isxdigit(*(iter+1))
+ || !std::isxdigit(*(iter+2)))
{
- char ch = *++iter; // need this because order of function arg
- // evaluation is UB.
- ret.append(1, hex_to_char(ch, *++iter));
+ result.append(1, '%');
}
- else // we're not dealing with a properly encoded hex value.
+ else // we've got a properly encoded hex value.
{
- ret.append(1, '%');
+ char ch = *++iter; // need this because order of function arg
+ // evaluation is UB.
+ result.append(1, hex_to_char(ch, *++iter));
}
break;
default:
- ret.append(1, *iter);
+ result.append(1, *iter);
}
}
- return ret;
+ return result;
}
} // namespace detail
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/acceptor_service_impl.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/acceptor_service_impl.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/acceptor_service_impl.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -25,7 +25,7 @@
#include "boost/cgi/detail/throw_error.hpp"
#include "boost/cgi/detail/service_base.hpp"
#include "boost/cgi/detail/protocol_traits.hpp"
-#include "boost/cgi/common/basic_protocol_service_fwd.hpp"
+#include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
namespace cgi {
@@ -73,7 +73,7 @@
* which takes a ProtocolService (**LINK**). If the protocol isn't async then
* the class can be used without a ProtocolService.
*/
- template<typename Protocol_ = ::cgi::fcgi_>
+ template<typename Protocol_ = ::cgi::common::fcgi_>
class acceptor_service_impl
: public detail::service_base< ::cgi::fcgi::acceptor_service_impl<Protocol_> >
{
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 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -15,16 +15,16 @@
#include <boost/logic/tribool.hpp>
#include <boost/asio/buffer.hpp>
///////////////////////////////////////////////////////////
-#include "boost/cgi/tags.hpp"
#include "boost/cgi/error.hpp"
#include "boost/cgi/common/map.hpp"
+#include "boost/cgi/common/tags.hpp"
#include "boost/cgi/import/read.hpp"
#include "boost/cgi/basic_client.hpp"
#include "boost/cgi/import/buffer.hpp"
#include "boost/cgi/import/io_service.hpp"
-#include "boost/cgi/basic_request_fwd.hpp"
#include "boost/cgi/fcgi/specification.hpp"
#include "boost/cgi/detail/throw_error.hpp"
+#include "boost/cgi/fwd/basic_request_fwd.hpp"
#include "boost/cgi/detail/protocol_traits.hpp"
#include "boost/cgi/connections/shareable_tcp_socket.hpp"
@@ -296,7 +296,7 @@
namespace fcgi {
typedef
common::basic_client<
- common::shareable_tcp_connection, ::cgi::fcgi_
+ common::shareable_tcp_connection, ::cgi::common::fcgi_
>
client;
} // namespace fcgi
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/request.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/request.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/request.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -9,11 +9,10 @@
#ifndef CGI_FCGI_REQUEST_HPP_INCLUDED__
#define CGI_FCGI_REQUEST_HPP_INCLUDED__
-#include "boost/cgi/tags.hpp"
-#include "boost/cgi/basic_request_fwd.hpp"
-//#include "boost/cgi/request_service_fwd.hpp"
+#include "boost/cgi/common/tags.hpp"
#include "boost/cgi/fcgi/service.hpp"
#include "boost/cgi/fcgi/request_service.hpp"
+#include "boost/cgi/fwd/basic_request_fwd.hpp"
namespace cgi {
namespace fcgi {
@@ -28,6 +27,6 @@
} // namespace fcgi
} // namespace cgi
-//#include "boost/cgi/basic_request.hpp"
+#include "boost/cgi/basic_request.hpp"
#endif // CGI_FCGI_REQUEST_HPP_INCLUDED__
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/request_acceptor_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/request_acceptor_service.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/request_acceptor_service.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -17,7 +17,7 @@
#include "boost/cgi/detail/service_base.hpp"
#include "boost/cgi/detail/protocol_traits.hpp"
#include "boost/cgi/fcgi/acceptor_service_impl.hpp"
-#include "boost/cgi/common/basic_protocol_service_fwd.hpp"
+#include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
namespace cgi {
@@ -29,7 +29,7 @@
* which takes a ProtocolService (**LINK**). If the protocol isn't async then
* the class can be used without a ProtocolService.
*/
- template<typename Protocol_ = fcgi_>
+ template<typename Protocol_ = common::fcgi_>
class fcgi_request_acceptor_service
: public detail::service_base<fcgi_request_acceptor_service<Protocol_> >
{
@@ -46,7 +46,7 @@
/// The unique service identifier
//static boost::asio::io_service::id id;
- fcgi_request_acceptor_service(::cgi::common::io_service& ios)
+ fcgi_request_acceptor_service(common::io_service& ios)
: detail::service_base<fcgi_request_acceptor_service<protocol_type> >(ios)
, service_impl_(ios)
{
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/request_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/request_service.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/request_service.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -13,8 +13,8 @@
#include <boost/system/error_code.hpp>
#include <boost/fusion/include/vector.hpp>
////////////////////////////////////////////////////////////////
-#include "boost/cgi/tags.hpp"
#include "boost/cgi/common/map.hpp"
+#include "boost/cgi/common/tags.hpp"
#include "boost/cgi/fcgi/client.hpp"
#include "boost/cgi/import/read.hpp"
#include "boost/cgi/http/status_code.hpp"
@@ -68,7 +68,7 @@
struct implementation_type
: common::request_base<fcgi_request_service>::impl_base
{
- typedef ::cgi::fcgi_ protocol_type;
+ typedef ::cgi::common::fcgi_ protocol_type;
typedef ::cgi::fcgi::client client_type;
typedef client_type::connection_type connection_type;
typedef client_type::header_buffer_type header_buffer_type;
@@ -722,3 +722,4 @@
} // namespace cgi
#endif // CGI_FCGI_REQUEST_SERVICE_HPP_INCLUDED__
+
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/service.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/service.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -9,7 +9,7 @@
#ifndef CGI_FCGI_SERVICE_HPP_INCLUDED__
#define CGI_FCGI_SERVICE_HPP_INCLUDED__
-#include "boost/cgi/tags.hpp"
+#include "boost/cgi/common/tags.hpp"
#include "boost/cgi/common/basic_protocol_service.hpp"
namespace cgi {
@@ -19,7 +19,7 @@
namespace fcgi {
// typedef for standard scgi::service (a model of ProtocolService)
- typedef ::cgi::common::basic_protocol_service< ::cgi::fcgi_> service;
+ typedef ::cgi::common::basic_protocol_service< ::cgi::common::fcgi_> service;
}
} // namespace cgi
Copied: sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/basic_protocol_service_fwd.hpp (from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/common/basic_protocol_service_fwd.hpp)
==============================================================================
--- /sandbox/SOC/2007/cgi/trunk/boost/cgi/common/basic_protocol_service_fwd.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/basic_protocol_service_fwd.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -13,7 +13,7 @@
#pragma once
#endif
-#include "boost/cgi/common/io_service_provider_fwd.hpp"
+#include "boost/cgi/fwd/io_service_provider_fwd.hpp"
namespace cgi {
namespace common {
Copied: sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/basic_request_fwd.hpp (from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_fwd.hpp)
==============================================================================
--- /sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request_fwd.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/basic_request_fwd.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -9,11 +9,9 @@
#ifndef CGI_BASIC_REQUEST_FWD_HPP_INCLUDED__
#define CGI_BASIC_REQUEST_FWD_HPP_INCLUDED__
-#include <memory>
-///////////////////////////////////////////////////////////
#include "boost/cgi/common/role_type.hpp"
-#include "boost/cgi/request_service_fwd.hpp"
-#include "boost/cgi/common/basic_protocol_service_fwd.hpp"
+#include "boost/cgi/fwd/request_service_fwd.hpp"
+#include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
namespace cgi {
namespace common {
Copied: sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/io_service_provider_fwd.hpp (from r45646, /sandbox/SOC/2007/cgi/trunk/boost/cgi/common/io_service_provider_fwd.hpp)
==============================================================================
--- /sandbox/SOC/2007/cgi/trunk/boost/cgi/common/io_service_provider_fwd.hpp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/fwd/io_service_provider_fwd.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -13,7 +13,7 @@
#pragma once
#endif
-#include "boost/cgi/tags.hpp"
+#include "boost/cgi/common/tags.hpp"
namespace cgi {
namespace common {
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/form_parser.ipp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/form_parser.ipp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/form_parser.ipp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -11,8 +11,8 @@
#include "boost/cgi/error.hpp"
#include "boost/cgi/basic_client.hpp"
-#include "boost/cgi/common/form_parser.hpp"
#include "boost/cgi/detail/url_decode.hpp"
+#include "boost/cgi/common/form_parser.hpp"
namespace cgi {
namespace detail {
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/response.ipp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/response.ipp (original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/impl/response.ipp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
@@ -16,8 +16,8 @@
#include <string>
///////////////////////////////////////////////////////////
-#include <boost/foreach.hpp>
#include <boost/bind.hpp>
+#include <boost/foreach.hpp>
///////////////////////////////////////////////////////////
#include "boost/cgi/import/write.hpp"
#include "boost/cgi/import/buffer.hpp"
@@ -26,17 +26,16 @@
#include "boost/cgi/common/response.hpp"
#include "boost/cgi/http/status_code.hpp"
#include "boost/cgi/import/streambuf.hpp"
-#include "boost/cgi/basic_request_fwd.hpp"
#include "boost/cgi/detail/throw_error.hpp"
+#include "boost/cgi/fwd/basic_request_fwd.hpp"
namespace cgi {
namespace common {
- template<typename T>
- BOOST_CGI_INLINE basic_response<T>::basic_response(
- common::http::status_code sc)
- : buffer_(new ::cgi::streambuf())
+ template<typename T> BOOST_CGI_INLINE
+ basic_response<T>::basic_response(http::status_code sc)
+ : buffer_(new common::streambuf())
, ostream_(buffer_.get())
, http_status_(sc)
, headers_terminated_(false)
@@ -49,8 +48,8 @@
* destruction.
*/
template<typename T> BOOST_CGI_INLINE
- basic_response<T>::basic_response(::cgi::streambuf* buf,
- common::http::status_code sc)
+ basic_response<T>::basic_response(common::streambuf* buf,
+ http::status_code sc)
: ostream_(buf)
, http_status_(sc)
{
@@ -122,7 +121,7 @@
template<typename T>
template<typename SyncWriteStream> BOOST_CGI_INLINE
boost::system::error_code
- basic_response<T>::flush(SyncWriteStream& sws, boost::system::error_code& ec)
+ basic_response<T>::flush(SyncWriteStream& sws, boost::system::error_code& ec)
{
if (!headers_terminated_)
{
@@ -232,7 +231,7 @@
/// Get the buffer associated with the stream
template<typename T> BOOST_CGI_INLINE
common::streambuf*
- basic_response<T>::rdbuf()
+ basic_response<T>::rdbuf()
{
return static_cast<common::streambuf*>(ostream_.rdbuf());
}
@@ -240,57 +239,56 @@
/// Set the status code associated with the response.
template<typename T> BOOST_CGI_INLINE
basic_response<T>&
- basic_response<T>::set_status(const http::status_code& num)
- {
- http_status_ = num;
- return *this;
- }
+ basic_response<T>::set_status(const http::status_code& num)
+ {
+ http_status_ = num;
+ return *this;
+ }
/// Get the status code associated with the response.
template<typename T> BOOST_CGI_INLINE
http::status_code&
- basic_response<T>::status()
- {
- return http_status_;
- }
+ basic_response<T>::status()
+ {
+ return http_status_;
+ }
/// Allow more headers to be added (WARNING: avoid using this).
template<typename T> BOOST_CGI_INLINE
void basic_response<T>::unterminate_headers()
- {
- headers_terminated_ = false;
- }
+ {
+ headers_terminated_ = false;
+ }
/// Get the length of the body of the response
template<typename T> BOOST_CGI_INLINE
- std::size_t
- basic_response<T>::content_length()
- {
- return rdbuf()->size();
- }
+ std::size_t basic_response<T>::content_length()
+ {
+ return rdbuf()->size();
+ }
/// Add a header after appending the CRLF sequence.
template<typename T> BOOST_CGI_INLINE
basic_response<T>&
- basic_response<T>::set_header(
+ basic_response<T>::set_header(
typename basic_response<T>::string_type const& value)
- {
- BOOST_ASSERT(!headers_terminated_);
- headers_.push_back(value + "\r\n");
- return *this;
- }
+ {
+ BOOST_ASSERT(!headers_terminated_);
+ headers_.push_back(value + "\r\n");
+ return *this;
+ }
/// Format and add a header given name and value, appending CRLF.
template<typename T> BOOST_CGI_INLINE
basic_response<T>&
- basic_response<T>::set_header(
- typename basic_response<T>::string_type const& name
- , typename basic_response<T>::string_type const& value)
- {
- BOOST_ASSERT(!headers_terminated_);
- headers_.push_back(name + ": " + value + "\r\n");
- return *this;
- }
+ basic_response<T>::set_header(
+ typename basic_response<T>::string_type const& name
+ , typename basic_response<T>::string_type const& value)
+ {
+ BOOST_ASSERT(!headers_terminated_);
+ headers_.push_back(name + ": " + value + "\r\n");
+ return *this;
+ }
template<typename T> BOOST_CGI_INLINE
void basic_response<T>::clear_headers()
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/is_async.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/is_async.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
+++ (empty file)
@@ -1,32 +0,0 @@
-// -- is_async.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// 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)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_IS_ASYNC_HPP_INCLUDED__
-#define CGI_IS_ASYNC_HPP_INCLUDED__
-
-#include <boost/mpl/bool.hpp>
-
-#include "tags.hpp"
-
-namespace cgi {
-
- template<typename Protocol>
- struct is_async
- : boost::mpl::bool_<true>::type
- {
- };
-
- template<>
- struct is_async<tags::cgi>
- : boost::mpl::bool_<false>::type
- {
- };
-
-} // namespace cgi
-
-#endif // CGI_IS_ASYNC_HPP_INCLUDED__
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/request_acceptor_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/request_acceptor_service.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
+++ (empty file)
@@ -1,101 +0,0 @@
-// -- request_acceptor_service.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// 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)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_REQUEST_ACCEPTOR_SERVICE_HPP_INCLUDED
-#define CGI_REQUEST_ACCEPTOR_SERVICE_HPP_INCLUDED
-
-#include "detail/throw_error.hpp"
-#include "detail/protocol_traits.hpp"
-#include "detail/service_base.hpp"
-
-namespace cgi {
-
- template<typename Protocol>
- class request_acceptor_service
- : public detail::service_base<request_acceptor_service<Protocol> >
- {
- typedef detail::protocol_traits<Protocol>::acceptor_service_impl
- service_impl_type;
- public:
- typedef typename service_impl_type::impl_type implementation_type;
- typedef Protocol protocol_type;
-
- request_acceptor_service(basic_protocol_service<protocol_type>& s)
- : detail::service_base<request_acceptor_service<Protocol>(s.io_service())
- {
- }
-
- void shutdown_service()
- {
- }
-
- void construct(implementation_type& impl)
- {
- service_impl_.construct(impl);
- }
-
- void destroy(implementation_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- /// Accept a request
- /**
- * Check if there is a waiting request in the queue. If not, accept a
- * connection, and associate it with the request.
- */
- template<typename CommonGatewayRequest>
- boost::system::error_code&
- accept(implementation_type& impl, CommonGatewayRequest& request
- , boost::system::error_code& ec)
- {
- return service_impl_.accept(impl, request, ec);
- /*
- boost::thread::mutex::scoped_lock lk(io_service_.mutex_);
- if( !io_service_.request_queue_.empty() )
- {
- request = pservice_.request_queue_.front();
- pservice_.request_queue_.pop();
-
- return ec;
- }
- lk.unlock();
- pservice_.gateway_.accept(&request.connection(), ec);
-
- return ec;
- */
- }
-
- /// Asynchronously accept a request
- template<typename CommonGatewayRequest, typename Handler>
- void async_accept(implementation_type& impl, CommonGatewayRequest& request
- , Handler handler)
- {
- service_impl_.async_accept(impl, request, handler);
- /*
- boost::thread::mutex::scoped_lock lk(io_service_.mutex_);
- if( !io_service_.request_queue_.empty() )
- {
- request = pservice_.request_queue_.front();
- pservice_.request_queue_.pop();
-
- return ec;
- }
- lk.unlock();
- pservice_.gateway_.async_accept(request.connection(), handler);
- */
- }
-
- private:
- service_impl_type& service_impl_;
- // basic_protocol_service<protocol_type>& pservice_;
- };
-
-} // namespace cgi
-
-#endif // CGI_REQUEST_ACCEPTOR_SERVICE_HPP_INCLUDED
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/request_service.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/request_service.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
+++ (empty file)
@@ -1,166 +0,0 @@
-// -- request_service.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// 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)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_REQUEST_SERVICE_HPP_INCLUDED
-#define CGI_REQUEST_SERVICE_HPP_INCLUDED
-
-#include "boost/cgi/detail/push_options.hpp"
-
-#include <boost/utility/enable_if.hpp>
-///////////////////////////////////////////////////////////
-#include "boost/cgi/import/io_service.hpp"
-#include "boost/cgi/detail/protocol_traits.hpp"
-#include "boost/cgi/common/basic_protocol_service_fwd.hpp"
-#include "boost/cgi/detail/service_base.hpp"
-
-namespace cgi {
- namespace common {
-
- /// The generic service class for basic_request<>s
- /**
- * Note: If the protocol is an asynchronous protocol, which means it requires
- * access to a boost::asio::io_service instance, then this class becomes a
- * model of the Service concept (**LINK**) and must only use the constructor
- * which takes a ProtocolService (**LINK**). If the protocol isn't async then
- * the class can be used without a ProtocolService.
- */
- template<typename Protocol>
- class request_service
- : public detail::service_base<request_service<Protocol> >
- {
- // The platform-specific implementation (only one for now)
- typedef typename detail::protocol_traits<Protocol>::request_service_impl
- service_impl_type;
-
- public:
- typedef typename service_impl_type::impl_type impl_type;
- typedef typename
- service_impl_type::implementation_type implementation_type;
- typedef Protocol protocol_type;
- typedef common::basic_protocol_service<Protocol> protocol_service_type;
-
- /// The unique service identifier
- //static boost::asio::io_service::id id;
- //explicit request_service()
- //{
- //}
-
- request_service(::cgi::common::io_service& ios)
- : detail::service_base<request_service<Protocol> >(ios)
- , service_impl_(boost::asio::use_service<service_impl_type>(ios))
- {
- }
-
- request_service(protocol_service_type& ps)
- : detail::service_base<request_service<Protocol> >(ps.io_service())
- , service_impl_(boost::asio::use_service<service_impl_type>(ps.io_service()))
- {
- }
-
- void construct(impl_type& impl)
- {
- service_impl_.construct(impl);
- }
-
- void destroy(impl_type& impl)
- {
- service_impl_.destroy(impl);
- }
-
- void shutdown_service()
- {
- service_impl_.shutdown_service();
- }
-
- impl_type null() const
- {
- return service_impl_.null();
- }
-
- //void construct
-
- boost::system::error_code&
- load(impl_type& impl, bool parse_stdin, boost::system::error_code& ec)
- {
- return service_impl_.load(impl, parse_stdin, ec);
- }
-
-
- template<typename Handler>
- void async_load(impl_type& impl, bool parse_stdin, Handler handler)
- {
- service_impl_.async_load(impl, parse_stdin, handler);
- }
-
- bool is_open(impl_type& impl)
- {
- return service_impl_.is_open(impl);
- }
-
- boost::system::error_code&
- set_header(impl_type& impl, const std::string& name
- , const std::string& value, boost::system::error_code& ec)
- {
- return service_impl_.set_header(impl, name, value, ec);
- }
-
-/*
- template<typename ConstBufferSequence>
- std::size_t write_some(impl_type& impl, const ConstBufferSequence& buf
- , boost::system::error_code& ec)
- {
- return service_impl_.write_some(impl, buf, ec);
- }
-
- template<typename MutableBufferSequence>
- std::size_t read_some(impl_type& impl, MutableBufferSequence buf
- , boost::system::error_code& ec)
- {
- return service_impl_.read_some(impl, buf, ec);
- }
-*/
- std::string
- GET(impl_type& impl, const std::string& name
- , boost::system::error_code& ec)
- {
- return service_impl_.GET(impl, name, ec);
- }
-
- std::string
- POST(impl_type& impl, const std::string& name
- , boost::system::error_code& ec)
- {
- return service_impl_.POST(impl, name, ec);
- }
-
- std::string
- cookie(impl_type& impl, const std::string& name
- , boost::system::error_code& ec)
- {
- return service_impl_.cookie(impl, name, ec);
- }
-
- /*
- std::string
- header(impl_type& impl, const std::string& name
- , boost::system::error_code& ec)
- {
- return "";
- }
-*/
-
- private:
- service_impl_type& service_impl_;
- };
-
- } // namespace common
-} // namespace cgi
-
-#include "boost/cgi/detail/pop_options.hpp"
-
-#endif // CGI_REQUEST_SERVICE_HPP_INCLUDED
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/request_service_fwd.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/request_service_fwd.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
+++ (empty file)
@@ -1,28 +0,0 @@
-// -- request_service_fwd.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// 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)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_REQUEST_SERVICE_FWD_HPP_INCLUDED
-#define CGI_REQUEST_SERVICE_FWD_HPP_INCLUDED
-
-
-namespace cgi {
-
- /// The generic service class for basic_request<>s
- /**
- * Note: If the protocol is an asynchronous protocol, which means it requires
- * access to a boost::asio::io_service instance, then this class becomes a
- * model of the Service concept (**LINK**) and must only use the constructor
- * which takes a ProtocolService (**LINK**). If the protocol isn't async then
- * the class can be used without a ProtocolService.
- */
- template<typename Protocol>
- class request_service;
-
-} // namespace cgi
-
-#endif // CGI_REQUEST_SERVICE_FWD_HPP_INCLUDED
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/tags.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/tags.hpp 2008-05-22 10:19:21 EDT (Thu, 22 May 2008)
+++ (empty file)
@@ -1,50 +0,0 @@
-// -- tags.hpp --
-//
-// Copyright (c) Darren Garvey 2007.
-// 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)
-//
-////////////////////////////////////////////////////////////////
-#ifndef CGI_TAGS_HPP_INCLUDED__
-#define CGI_TAGS_HPP_INCLUDED__
-
-#if _MSC_VER > 1020
-#pragma once
-#endif
-
-namespace cgi {
-
- /// SCGI (note, this must be removed)
- struct scgi_{};
- /// FastCGI
- struct fcgi_{};
-
- namespace tags {
-
- // the null tag type
- struct null {};
-
- // protocol types
- struct cgi {};
- struct async_cgi {}; // call it acgi?
- struct acgi {};
- struct fcgi {};
- struct scgi {};
-
- // IoServiceProvider PoolingPolicy types
- struct single_service {};
- struct service_pool {};
- struct round_robin {};
-
- // Connection types
- struct stdio {};
- struct async_stdio {};
- struct tcp_socket {};
- // A shareable tcp_socket (ie. one that can be locked)
- struct shareable_tcp_socket {};
-
- } // namespace tags
-} // namespace cgi
-
-#endif // CGI_TAGS_HPP_INCLUDED__
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