Boost logo

Boost-Commit :

From: drrngrvy_at_[hidden]
Date: 2007-07-05 20:23:56


Author: drrngrvy
Date: 2007-07-05 20:23:55 EDT (Thu, 05 Jul 2007)
New Revision: 7372
URL: http://svn.boost.org/trac/boost/changeset/7372

Log:
fix/simplify ostream::async_send

Text files modified:
   sandbox/SOC/2007/cgi/boost/cgi/ostream.hpp | 30 ++----------------------------
   1 files changed, 2 insertions(+), 28 deletions(-)

Modified: sandbox/SOC/2007/cgi/boost/cgi/ostream.hpp
==============================================================================
--- sandbox/SOC/2007/cgi/boost/cgi/ostream.hpp (original)
+++ sandbox/SOC/2007/cgi/boost/cgi/ostream.hpp 2007-07-05 20:23:55 EDT (Thu, 05 Jul 2007)
@@ -237,31 +237,6 @@
       req.set_status(http_status_);
     }
 
- template<typename CommonGatewayRequest, typename Handler>
- class send_handler
- {
- public:
- send_handler(CommonGatewayRequest& req, http::status_code status
- , Handler handler)
- : request_(req)
- , http_status_(status)
- , handler_(handler)
- {
- }
-
- void operator()(boost::system::error_code ec)
- {
- if( !ec )
- {
- request_.set_status(http_status_);
-
- }
- private:
- CommonGatewayRequest& request_;
- int http_status_;
- Handler handler_;
- };
-
     /// Asynchronously send the data through the supplied request
     /**
      * Note: The data in the stream isn't cleared after this call.
@@ -269,9 +244,8 @@
     template<typename CommonGatewayRequest, typename Handler>
     void async_send(CommonGatewayRequest& req, Handler handler)
     {
- req.async_write(ostream_.rdbuf(), destination_
- , send_handler<CommonGatewayRequest
- , Handler>(req, http_status_, handler));
+ req.set_status(http_status_);
+ req.async_write(ostream_.rdbuf(), destination_, handler));
     }
 
     /// Get the buffer associated with the


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