8
8
// (See accompanying file LICENSE_1_0.txt or copy at
9
9
// http://www.boost.org/LICENSE_1_0.txt)
10
10
11
+ #include < iterator>
11
12
#include < boost/fusion/tuple/tuple.hpp>
12
13
#include < boost/fusion/tuple/tuple_tie.hpp>
13
14
#include < boost/logic/tribool.hpp>
@@ -112,10 +113,10 @@ struct http_async_protocol_handler {
112
113
if (parsed_ok == true ) {
113
114
string_type version;
114
115
std::swap (version, partial_parsed);
115
- version.append (boost ::begin (result_range), boost ::end (result_range));
116
+ version.append (std ::begin (result_range), std ::end (result_range));
116
117
algorithm::trim (version);
117
118
version_promise.set_value (version);
118
- part_begin = boost ::end (result_range);
119
+ part_begin = std ::end (result_range);
119
120
} else if (parsed_ok == false ) {
120
121
#ifdef BOOST_NETWORK_DEBUG
121
122
string_type escaped;
@@ -134,8 +135,8 @@ struct http_async_protocol_handler {
134
135
destination_promise.set_exception (boost::copy_exception (error));
135
136
body_promise.set_exception (boost::copy_exception (error));
136
137
} else {
137
- partial_parsed.append (boost ::begin (result_range),
138
- boost ::end (result_range));
138
+ partial_parsed.append (std ::begin (result_range),
139
+ std ::end (result_range));
139
140
part_begin = part.begin ();
140
141
delegate_->read_some (
141
142
boost::asio::mutable_buffers_1 (part.c_array (), part.size ()),
@@ -158,11 +159,11 @@ struct http_async_protocol_handler {
158
159
if (parsed_ok == true ) {
159
160
string_type status;
160
161
std::swap (status, partial_parsed);
161
- status.append (boost ::begin (result_range), boost ::end (result_range));
162
+ status.append (std ::begin (result_range), std ::end (result_range));
162
163
trim (status);
163
164
boost::uint16_t status_int = lexical_cast<boost::uint16_t >(status);
164
165
status_promise.set_value (status_int);
165
- part_begin = boost ::end (result_range);
166
+ part_begin = std ::end (result_range);
166
167
} else if (parsed_ok == false ) {
167
168
#ifdef BOOST_NETWORK_DEBUG
168
169
string_type escaped;
@@ -180,8 +181,8 @@ struct http_async_protocol_handler {
180
181
destination_promise.set_exception (boost::copy_exception (error));
181
182
body_promise.set_exception (boost::copy_exception (error));
182
183
} else {
183
- partial_parsed.append (boost ::begin (result_range),
184
- boost ::end (result_range));
184
+ partial_parsed.append (std ::begin (result_range),
185
+ std ::end (result_range));
185
186
part_begin = part.begin ();
186
187
delegate_->read_some (
187
188
boost::asio::mutable_buffers_1 (part.c_array (), part.size ()),
@@ -204,11 +205,11 @@ struct http_async_protocol_handler {
204
205
if (parsed_ok == true ) {
205
206
string_type status_message;
206
207
std::swap (status_message, partial_parsed);
207
- status_message.append (boost ::begin (result_range),
208
- boost ::end (result_range));
208
+ status_message.append (std ::begin (result_range),
209
+ std ::end (result_range));
209
210
algorithm::trim (status_message);
210
211
status_message_promise.set_value (status_message);
211
- part_begin = boost ::end (result_range);
212
+ part_begin = std ::end (result_range);
212
213
} else if (parsed_ok == false ) {
213
214
#ifdef BOOST_NETWORK_DEBUG
214
215
string_type escaped;
@@ -225,8 +226,8 @@ struct http_async_protocol_handler {
225
226
destination_promise.set_exception (boost::copy_exception (error));
226
227
body_promise.set_exception (boost::copy_exception (error));
227
228
} else {
228
- partial_parsed.append (boost ::begin (result_range),
229
- boost ::end (result_range));
229
+ partial_parsed.append (std ::begin (result_range),
230
+ std ::end (result_range));
230
231
part_begin = part.begin ();
231
232
delegate_->read_some (
232
233
boost::asio::mutable_buffers_1 (part.c_array (), part.size ()),
@@ -250,12 +251,12 @@ struct http_async_protocol_handler {
250
251
if (headers_parser.state () != response_parser_type::http_header_colon)
251
252
break ;
252
253
header_pair.first =
253
- string_type (boost ::begin (result_range), boost ::end (result_range));
254
+ string_type (std ::begin (result_range), std ::end (result_range));
254
255
input_range.advance_begin (boost::distance (result_range));
255
256
fusion::tie (parsed_ok, result_range) = headers_parser.parse_until (
256
257
response_parser_type::http_header_line_done, input_range);
257
258
header_pair.second =
258
- string_type (boost ::begin (result_range), boost ::end (result_range));
259
+ string_type (std ::begin (result_range), std ::end (result_range));
259
260
input_range.advance_begin (boost::distance (result_range));
260
261
261
262
trim (header_pair.first );
@@ -270,7 +271,7 @@ struct http_async_protocol_handler {
270
271
headers.equal_range (" Transfer-Encoding" );
271
272
is_chunk_encoding =
272
273
!boost::empty (transfer_encoding_range) &&
273
- boost::iequals (boost ::begin (transfer_encoding_range)->second ,
274
+ boost::iequals (std ::begin (transfer_encoding_range)->second ,
274
275
" chunked" );
275
276
headers_promise.set_value (headers);
276
277
}
@@ -290,9 +291,9 @@ struct http_async_protocol_handler {
290
291
if (parsed_ok == true ) {
291
292
string_type headers_string;
292
293
std::swap (headers_string, partial_parsed);
293
- headers_string.append (boost ::begin (result_range),
294
- boost ::end (result_range));
295
- part_begin = boost ::end (result_range);
294
+ headers_string.append (std ::begin (result_range),
295
+ std ::end (result_range));
296
+ part_begin = std ::end (result_range);
296
297
this ->parse_headers_real (headers_string);
297
298
} else if (parsed_ok == false ) {
298
299
// We want to output the contents of the buffer that caused
@@ -312,15 +313,15 @@ struct http_async_protocol_handler {
312
313
source_promise.set_exception (boost::copy_exception (error));
313
314
destination_promise.set_exception (boost::copy_exception (error));
314
315
} else {
315
- partial_parsed.append (boost ::begin (result_range),
316
- boost ::end (result_range));
316
+ partial_parsed.append (std ::begin (result_range),
317
+ std ::end (result_range));
317
318
part_begin = part.begin ();
318
319
delegate_->read_some (
319
320
boost::asio::mutable_buffers_1 (part.c_array (), part.size ()),
320
321
callback);
321
322
}
322
323
return fusion::make_tuple (
323
- parsed_ok, std::distance (boost ::end (result_range), part_end));
324
+ parsed_ok, std::distance (std ::end (result_range), part_end));
324
325
}
325
326
326
327
template <class Delegate , class Callback >
@@ -356,4 +357,4 @@ struct http_async_protocol_handler {
356
357
} // namespace network
357
358
} // namespace boost
358
359
359
- #endif // BOOST_NETWORK_PROTOCOL_HTTP_IMPL_HTTP_ASYNC_PROTOCOL_HANDLER_HPP_20101015
360
+ #endif // BOOST_NETWORK_PROTOCOL_HTTP_IMPL_HTTP_ASYNC_PROTOCOL_HANDLER_HPP_20101015
0 commit comments