3636
3737#ifndef BOOST_NETWORK_HTTP_SERVER_CONNECTION_HEADER_BUFFER_MAX_SIZE
3838/* * Here we define a page's worth of header connection buffer data.
39- * This can be tuned to reduce the memory cost of connections, but this
39+ * This can be tuned to reduce the memory cost of connections, but this
4040 * default size is set to be friendly to typical service applications.
4141 * This is the maximum size though and Boost.Asio's internal representation
4242 * of a streambuf would make appropriate decisions on how big a buffer
@@ -91,7 +91,7 @@ namespace boost { namespace network { namespace http {
9191
9292private:
9393static char const *status_message (status_t status) {
94- static char const
94+ static char const
9595 ok_[] =" OK"
9696 , created_[] =" Created"
9797 , accepted_[] =" Accepted"
@@ -172,9 +172,9 @@ namespace boost { namespace network { namespace http {
172172
173173/* * Function: template <class Range> set_headers(Range headers)
174174 * Precondition: headers have not been sent yet
175- * Postcondition: headers have been linearized to a buffer,
175+ * Postcondition: headers have been linearized to a buffer,
176176 * and assumed to have been sent already when the function exits
177- * Throws: std::logic_error in case the headers have already been sent.
177+ * Throws: std::logic_error in case the headers have already been sent.
178178 *
179179 * A call to set_headers takes a Range where each element models the
180180 * Header concept. This Range will be linearized onto a buffer, which is
@@ -183,7 +183,7 @@ namespace boost { namespace network { namespace http {
183183template <class Range >
184184void set_headers (Range headers) {
185185 lock_guardlock (headers_mutex);
186- if (headers_in_progress || headers_already_sent)
186+ if (headers_in_progress || headers_already_sent)
187187boost::throw_exception (std::logic_error (" Headers have already been sent." ));
188188
189189if (error_encountered)
@@ -199,7 +199,7 @@ namespace boost { namespace network { namespace http {
199199if (!boost::empty (headers)) {
200200typedef typename Range::const_iterator iterator;
201201typedef typename string<Tag>::type string_type;
202- boost::transform (headers,
202+ boost::transform (headers,
203203 std::ostream_iterator<string_type>(stream),
204204 linearize_header<Tag>());
205205 }else {
@@ -228,11 +228,11 @@ namespace boost { namespace network { namespace http {
228228 lock_guardlock (headers_mutex);
229229if (error_encountered)boost::throw_exception (boost::system::system_error (*error_encountered));
230230
231- boost::function<void (boost::system::error_code)> f =
231+ boost::function<void (boost::system::error_code)> f =
232232boost::bind (
233233 &async_connection<Tag,Handler>::default_error
234234 , async_connection<Tag,Handler>::shared_from_this ()
235- ,_1 );
235+ ,boost::arg< 1 >() );
236236
237237write_impl (
238238boost::make_iterator_range (range)
@@ -390,7 +390,7 @@ namespace boost { namespace network { namespace http {
390390 new_start, data_end);
391391fusion::tie (parsed_ok, result_range) = parser.parse_until (
392392 request_parser_type::method_done, input_range);
393- if (!parsed_ok) {
393+ if (!parsed_ok) {
394394client_error ();
395395break ;
396396 }else if (parsed_ok ==true ) {
@@ -497,7 +497,7 @@ namespace boost { namespace network { namespace http {
497497 }
498498
499499void client_error () {
500- static char const * bad_request =
500+ static char const * bad_request =
501501" HTTP/1.0 400 Bad Request\r\n Connection: close\r\n Content-Type: text/plain\r\n Content-Length: 12\r\n\r\n Bad Request." ;
502502
503503asio::async_write (
@@ -583,17 +583,17 @@ namespace boost { namespace network { namespace http {
583583
584584static std::size_t const connection_buffer_size =
585585 BOOST_NETWORK_HTTP_SERVER_CONNECTION_BUFFER_SIZE;
586- shared_array_list temporaries =
586+ shared_array_list temporaries =
587587 boost::make_shared<array_list>();
588- shared_buffers buffers =
588+ shared_buffers buffers =
589589 boost::make_shared<std::vector<asio::const_buffer> >(0 );
590590
591591 std::size_t range_size =boost::distance (range);
592592 buffers->reserve (
593593 (range_size / connection_buffer_size)
594594 + ((range_size % connection_buffer_size)?1 :0 )
595595 );
596- std::size_t slice_size =
596+ std::size_t slice_size =
597597std::min (range_size,connection_buffer_size);
598598typename boost::range_iterator<Range>::type
599599 start =boost::begin (range)
@@ -667,11 +667,11 @@ namespace boost { namespace network { namespace http {
667667 }
668668 }
669669 };
670-
670+
671671}/* http*/
672-
672+
673673}/* network*/
674-
674+
675675}/* boost*/
676676
677677#endif /* BOOST_NETWORK_PROTOCOL_HTTP_SERVER_CONNECTION_HPP_20101027*/