$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r59990 - in sandbox/SOC/2007/cgi/trunk/boost/cgi: . connections detail fcgi scgi
From: lists.drrngrvy_at_[hidden]
Date: 2010-02-28 05:55:04
Author: drrngrvy
Date: 2010-02-28 05:55:02 EST (Sun, 28 Feb 2010)
New Revision: 59990
URL: http://svn.boost.org/trac/boost/changeset/59990
Log:
Fix bugs with moving protocol_traits.
Removed:
   sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/protocol_traits.hpp
   sandbox/SOC/2007/cgi/trunk/boost/cgi/scgi/
Text files modified: 
   sandbox/SOC/2007/cgi/trunk/boost/cgi/basic_request.hpp                    |     9 +++++----                               
   sandbox/SOC/2007/cgi/trunk/boost/cgi/connections/shareable_tcp_socket.hpp |    14 ++++++--------                          
   sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi.hpp                             |     1 -                                       
   sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/acceptor_service_impl.hpp       |     6 +++---                                  
   sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/client.hpp                      |     1 -                                       
   sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi/request_acceptor_service.hpp    |     5 ++---                                   
   6 files changed, 16 insertions(+), 20 deletions(-)
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	2010-02-28 05:55:02 EST (Sun, 28 Feb 2010)
@@ -95,11 +95,10 @@
     typedef typename traits::string_type               string_type;
     typedef typename traits::client_type               client_type;
     typedef typename traits::buffer_type               buffer_type;
+#ifdef BOOST_CGI_ENABLE_SESSIONS
     typedef typename traits::session_type              session_type;
 
     string_type session_id_;
-    
-#ifdef BOOST_CGI_ENABLE_SESSIONS
     session_type session;
 #endif // BOOST_CGI_ENABLE_SESSIONS
     
@@ -276,15 +275,17 @@
           env.set(env_vars(this->implementation.vars_));
         if (parse_opts & parse_get_only)
           get.set(get_vars(this->implementation.vars_));
-        if (parse_opts & parse_post_only)
+        if (parse_opts & parse_post_only) {
           post.set(post_vars(this->implementation.vars_));
-        if (parse_opts & parse_get_only || parse_opts & parse_get_only)
           uploads.set(upload_vars(this->implementation.vars_));
+        }
         if (parse_opts & parse_cookies) {
           cookies.set(cookie_vars(this->implementation.vars_));
+#ifdef BOOST_CGI_ENABLE_SESSIONS
           if (cookies.count("$ssid")) {
             session_id_ = cookies["$ssid"];
           }
+#endif // BOOST_CGI_ENABLE_SESSIONS
         }
         if (parse_opts & parse_form_only)
         {
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	2010-02-28 05:55:02 EST (Sun, 28 Feb 2010)
@@ -25,7 +25,7 @@
 #include "boost/cgi/detail/push_options.hpp"
 #include "boost/cgi/common/connection_base.hpp"
 
-#include "boost/cgi/detail/protocol_traits.hpp"
+#include "boost/cgi/common/protocol_traits.hpp"
 
 BOOST_CGI_NAMESPACE_BEGIN
  namespace common {
@@ -53,14 +53,12 @@
           typedef boost::mutex::scoped_lock                 scoped_lock_type;
     typedef boost::asio::ip::tcp::socket              next_layer_type;
 
+    typedef common::protocol_traits<tags::fcgi>       traits;
     /** FastCGI specific stuff **/
-    typedef
-      detail::protocol_traits<tags::fcgi>::request_type   request_type;
-    typedef 
-      detail::protocol_traits<tags::fcgi>::request_ptr    request_ptr;
-    typedef std::map<boost::uint16_t, request_type*> request_map_type;
-    typedef std::vector<request_type*>               request_vector_type;
-
+    typedef traits::request_type                      request_type;
+    typedef traits::request_ptr                       request_ptr;
+    typedef std::map<boost::uint16_t, request_type*>  request_map_type;
+    typedef std::vector<request_type*>                request_vector_type;
     /** End FastCGI stuff      **/
 
     // A wrapper to provide condition_type::pointer
Deleted: sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/protocol_traits.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/detail/protocol_traits.hpp	2010-02-28 05:55:02 EST (Sun, 28 Feb 2010)
+++ (empty file)
@@ -1,177 +0,0 @@
-//                -- protocol_traits.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)
-//
-////////////////////////////////////////////////////////////////
-//
-// Wow this is messy. It's not expected to last though; it's
-// merely here to make things more separated than they need to
-// be, so everything can be meshed together slowly.
-// (or something like that)
-//
-/////////////////////////////////////////////////////////////////
-#ifndef CGI_REQUEST_TRAITS_HPP_INCLUDED__
-#define CGI_REQUEST_TRAITS_HPP_INCLUDED__
-
-#include <boost/asio/ip/tcp.hpp>
-#include <boost/none.hpp>
-#include <boost/shared_ptr.hpp>
-///////////////////////////////////////////////////////////
-#include "boost/cgi/common/parse_options.hpp"
-#include "boost/cgi/common/role_type.hpp"
-#include "boost/cgi/common/tags.hpp"
-#include "boost/cgi/fcgi/specification.hpp"
-#include "boost/cgi/fwd/basic_client_fwd.hpp"
-#include "boost/cgi/fwd/basic_connection_fwd.hpp"
-#include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
-#include "boost/cgi/fwd/basic_request_fwd.hpp"
-#include "boost/cgi/fwd/form_parser_fwd.hpp"
-
-BOOST_CGI_NAMESPACE_BEGIN
-
-  namespace cgi  {}
-  namespace fcgi
-  {
-  class fcgi_service_impl;
-  class fcgi_request_service;
-  class fcgi_acceptor_service;
-  }
-  namespace scgi
-  {
-  class scgi_service_impl;
-  class scgi_request_service;
-  class scgi_acceptor_service;
-  }
-
-  // Forward declarations
-
-  class cgi_service_impl;
-  class fcgi_service_impl;
-
-  class fcgi_acceptor_service;
-
-  class cgi_request_service;
-  class fcgi_request_service;
-
- namespace detail {
-
-   namespace tags = ::BOOST_CGI_NAMESPACE::common::tags;
-   
-   template<typename Protocol>
-    struct protocol_traits
-    {
-    };
-
-    template<>
-    struct protocol_traits<tags::cgi>
-    {
-      typedef protocol_traits<tags::cgi>             type;
-      typedef cgi_request_service                    request_service_impl;
-      typedef cgi_request_service                    service_type;
-      typedef common::basic_protocol_service<
-                  tags::cgi
-              >                                      protocol_service_type;
-      typedef common::basic_request<
-                  tags::cgi
-              >                                      request_type; 
-      typedef cgi_service_impl                       service_impl_type;
-      typedef common::basic_connection<
-                  tags::async_stdio
-              >                                      connection_type;
-      typedef common::basic_client<
-                  connection_type,
-                  tags::cgi
-              >                                      client_type;
-      typedef common::form_parser                    form_parser_type;
-      typedef boost::none_t                          header_type;
-      typedef char                                   char_type;
-      typedef std::basic_string<char_type>           string_type;
-      typedef string_type                            buffer_type;
-      typedef boost::asio::const_buffers_1           const_buffers_type;
-      typedef boost::asio::mutable_buffers_1         mutable_buffers_type;
-      typedef common::role_type                      role_type;
-      typedef boost::shared_ptr<request_type>        pointer;
-      
-      static const common::parse_options parse_opts = common::parse_all;
-    };
-
-    template<>
-    struct protocol_traits<tags::fcgi>
-    {
-      typedef protocol_traits<tags::fcgi>            type;
-      typedef fcgi::fcgi_request_service             request_service_impl;
-      typedef fcgi::fcgi_request_service             service_type;
-      typedef common::basic_protocol_service<
-                  tags::fcgi
-              >                                      protocol_service_type;
-      typedef common::basic_request<
-                  tags::fcgi
-              >                                      request_type; 
-      typedef boost::shared_ptr<request_type>        request_ptr;
-      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;
-      typedef boost::asio::ip::tcp                   native_protocol_type;
-      typedef boost::asio::socket_acceptor_service<
-                  native_protocol_type
-              >                                      acceptor_service_type;
-      typedef 
-          acceptor_service_type::implementation_type acceptor_impl_type;
-      typedef acceptor_service_type::native_type     native_type;
-      typedef unsigned short                         port_number_type;
-      typedef boost::asio::ip::tcp::endpoint         endpoint_type;
-      typedef common::basic_client<
-                  connection_type,
-                  tags::fcgi
-              >                                      client_type;
-      typedef common::form_parser                    form_parser_type;
-      typedef fcgi::spec::header                     header_type;
-      typedef fcgi::spec_detail::role_types          role_type;
-
-      typedef char                                   char_type;
-      typedef std::basic_string<char_type>           string_type;
-      typedef string_type                            buffer_type;
-      typedef boost::asio::const_buffers_1           const_buffers_type;
-      typedef boost::asio::mutable_buffers_1         mutable_buffers_type;
-      typedef boost::shared_ptr<request_type>        pointer;
-
-      static const common::parse_options parse_opts = common::parse_none;
-    };
-
-    template<>
-    struct protocol_traits<tags::scgi>
-    {
-      typedef protocol_traits<tags::scgi>            type;
-      typedef scgi::scgi_request_service             request_service_impl;
-      typedef scgi::scgi_request_service             service_type;
-      typedef common::basic_protocol_service<tags::scgi>     protocol_service_type;
-      typedef common::basic_request<
-                  tags::scgi
-      >                                              request_type; 
-      typedef scgi::scgi_service_impl                service_impl_type;
-      typedef scgi::scgi_acceptor_service            acceptor_service_impl;
-      typedef common::basic_connection<tags::tcp_socket>     connection_type;
-      typedef common::basic_client<
-                  connection_type,
-                  tags::scgi
-              >                                      client_type;
-      typedef common::form_parser                    form_parser_type;
-      typedef char                                   char_type;
-      typedef std::basic_string<char_type>           string_type;
-      typedef string_type                            buffer_type;
-      typedef boost::asio::const_buffers_1           const_buffers_type;
-      typedef boost::asio::mutable_buffers_1         mutable_buffers_type;
-      typedef boost::shared_ptr<request_type>        pointer;
-
-      static const common::parse_options parse_opts = common::parse_none;
-    };
-
- } // namespace detail
-BOOST_CGI_NAMESPACE_END
-
-#endif // CGI_REQUEST_TRAITS_HPP_INCLUDED__
Modified: sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi.hpp	(original)
+++ sandbox/SOC/2007/cgi/trunk/boost/cgi/fcgi.hpp	2010-02-28 05:55:02 EST (Sun, 28 Feb 2010)
@@ -26,7 +26,6 @@
 /// Dump fcgi stuff into the boost namespace
 namespace boost {
  namespace fcgi {
-   using ::BOOST_CGI_NAMESPACE::detail::protocol_traits;
    using namespace ::BOOST_CGI_NAMESPACE::fcgi;
    using namespace ::BOOST_CGI_NAMESPACE::common; // import common elements.
  } // namespace fcgi
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	2010-02-28 05:55:02 EST (Sun, 28 Feb 2010)
@@ -21,12 +21,12 @@
 #include <boost/utility/enable_if.hpp>
 #include <boost/system/error_code.hpp>
 ///////////////////////////////////////////////////////////
+#include "boost/cgi/common/protocol_traits.hpp"
 #include "boost/cgi/fcgi/error.hpp"
 #include "boost/cgi/fcgi/request.hpp"
 #include "boost/cgi/import/io_service.hpp"
 #include "boost/cgi/detail/throw_error.hpp"
 #include "boost/cgi/detail/service_base.hpp"
-#include "boost/cgi/detail/protocol_traits.hpp"
 #include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
 
 BOOST_CGI_NAMESPACE_BEGIN
@@ -86,7 +86,7 @@
    
      typedef acceptor_service_impl<Protocol>        self_type;
      typedef Protocol                               protocol_type;
-     typedef detail::protocol_traits<Protocol>      traits;
+     typedef common::protocol_traits<Protocol>      traits;
      typedef typename traits::protocol_service_type protocol_service_type;
      typedef typename traits::native_protocol_type  native_protocol_type;
      typedef typename traits::native_type           native_type;
@@ -103,7 +103,7 @@
      struct implementation_type
      {
        typedef Protocol                               protocol_type;
-       typedef detail::protocol_traits<Protocol>      traits;
+       typedef common::protocol_traits<Protocol>      traits;
        typedef typename traits::protocol_service_type protocol_service_type;
        typedef typename traits::native_protocol_type  native_protocol_type;
        typedef typename traits::request_type          request_type;
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-02-28 05:55:02 EST (Sun, 28 Feb 2010)
@@ -20,7 +20,6 @@
 #include "boost/cgi/common/tags.hpp"
 #include "boost/cgi/connections/shareable_tcp_socket.hpp"
 #include "boost/cgi/detail/throw_error.hpp"
-#include "boost/cgi/detail/protocol_traits.hpp"
 #include "boost/cgi/fcgi/specification.hpp"
 #include "boost/cgi/fwd/basic_request_fwd.hpp"
 #include "boost/cgi/error.hpp"
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	2010-02-28 05:55:02 EST (Sun, 28 Feb 2010)
@@ -12,13 +12,12 @@
 
 #include <boost/utility/enable_if.hpp>
 ///////////////////////////////////////////////////////////
-#include "boost/cgi/import/io_service.hpp"
+#include "boost/cgi/common/tags.hpp"
 #include "boost/cgi/detail/throw_error.hpp"
 #include "boost/cgi/detail/service_base.hpp"
-#include "boost/cgi/common/tags.hpp"
-#include "boost/cgi/detail/protocol_traits.hpp"
 #include "boost/cgi/fcgi/acceptor_service_impl.hpp"
 #include "boost/cgi/fwd/basic_protocol_service_fwd.hpp"
+#include "boost/cgi/import/io_service.hpp"
 
 BOOST_CGI_NAMESPACE_BEGIN