@@ -40,7 +40,7 @@ namespace impl {
40
40
template <class Tag , unsigned version_major, unsigned version_minor>
41
41
struct async_connection_base ;
42
42
43
- namespace placeholders = asio::placeholders;
43
+ namespace placeholders = :: asio::placeholders;
44
44
45
45
template <class Tag , unsigned version_major, unsigned version_minor>
46
46
struct http_async_connection
@@ -145,7 +145,7 @@ struct http_async_connection
145
145
// Here we deal with the case that there was an error encountered and
146
146
// that there's still more endpoints to try connecting to.
147
147
resolver_iterator iter = boost::begin (endpoint_range);
148
- asio::ip::tcp::endpoint endpoint (iter->endpoint ().address (), port);
148
+ :: asio::ip::tcp::endpoint endpoint (iter->endpoint ().address (), port);
149
149
auto self = this ->shared_from_this ();
150
150
delegate_->connect (
151
151
endpoint, host, source_port,
@@ -155,7 +155,7 @@ struct http_async_connection
155
155
generator, std::make_pair (++iter_copy, resolver_iterator ()), ec);
156
156
}));
157
157
} else {
158
- set_errors (ec ? ec : asio::error::host_not_found);
158
+ set_errors (ec ? ec : :: asio::error::host_not_found);
159
159
boost::iterator_range<const char *> range;
160
160
if (callback) callback (range, ec);
161
161
}
@@ -168,7 +168,7 @@ struct http_async_connection
168
168
resolver_iterator_pair endpoint_range,
169
169
std::error_code const & ec) {
170
170
if (is_timedout_) {
171
- set_errors (asio::error::timed_out);
171
+ set_errors (:: asio::error::timed_out);
172
172
} else if (!ec) {
173
173
BOOST_ASSERT (delegate_.get () != 0 );
174
174
auto self = this ->shared_from_this ();
@@ -182,7 +182,7 @@ struct http_async_connection
182
182
} else {
183
183
if (!boost::empty (endpoint_range)) {
184
184
resolver_iterator iter = boost::begin (endpoint_range);
185
- asio::ip::tcp::endpoint endpoint (iter->endpoint ().address (), port);
185
+ :: asio::ip::tcp::endpoint endpoint (iter->endpoint ().address (), port);
186
186
auto self = this ->shared_from_this ();
187
187
delegate_->connect (
188
188
endpoint, host, source_port,
@@ -193,7 +193,7 @@ struct http_async_connection
193
193
ec);
194
194
}));
195
195
} else {
196
- set_errors (ec ? ec : asio::error::host_not_found);
196
+ set_errors (ec ? ec : :: asio::error::host_not_found);
197
197
boost::iterator_range<const char *> range;
198
198
if (callback) callback (range, ec);
199
199
}
@@ -231,15 +231,15 @@ struct http_async_connection
231
231
232
232
auto self = this ->shared_from_this ();
233
233
delegate_->read_some (
234
- asio::mutable_buffers_1 (this ->part .data (),
234
+ :: asio::mutable_buffers_1 (this ->part.data(),
235
235
this->part.size()),
236
236
request_strand_.wrap([=] (std::error_code const &ec,
237
237
std::size_t bytes_transferred) {
238
238
self->handle_received_data (version, get_body, callback,
239
239
ec, bytes_transferred);
240
240
}));
241
241
} else {
242
- set_errors (is_timedout_ ? asio::error::timed_out : ec);
242
+ set_errors (is_timedout_ ? :: asio::error::timed_out : ec);
243
243
}
244
244
}
245
245
@@ -250,19 +250,19 @@ struct http_async_connection
250
250
static const long short_read_error = 335544539 ;
251
251
bool is_ssl_short_read_error =
252
252
#ifdef BOOST_NETWORK_ENABLE_HTTPS
253
- ec.category () == asio::error::ssl_category &&
253
+ ec.category () == :: asio::error::ssl_category &&
254
254
ec.value () == short_read_error;
255
255
#else
256
256
false && short_read_error;
257
257
#endif
258
258
if (!is_timedout_ &&
259
- (!ec || ec == asio::error::eof || is_ssl_short_read_error)) {
259
+ (!ec || ec == :: asio::error::eof || is_ssl_short_read_error)) {
260
260
logic::tribool parsed_ok;
261
261
size_t remainder ;
262
262
auto self = this ->shared_from_this ();
263
263
switch (state) {
264
264
case version:
265
- if (ec == asio::error::eof) return ;
265
+ if (ec == :: asio::error::eof) return ;
266
266
parsed_ok = this ->parse_version (
267
267
delegate_,
268
268
request_strand_.wrap ([=] (std::error_code const &ec,
@@ -275,7 +275,7 @@ struct http_async_connection
275
275
return ;
276
276
}
277
277
case status:
278
- if (ec == asio::error::eof) return ;
278
+ if (ec == :: asio::error::eof) return ;
279
279
parsed_ok = this ->parse_status (
280
280
delegate_,
281
281
request_strand_.wrap ([=] (std::error_code const &ec,
@@ -288,7 +288,7 @@ struct http_async_connection
288
288
return ;
289
289
}
290
290
case status_message:
291
- if (ec == asio::error::eof) return ;
291
+ if (ec == :: asio::error::eof) return ;
292
292
parsed_ok = this ->parse_status_message (
293
293
delegate_, request_strand_.wrap ([=] (std::error_code const &,
294
294
std::size_t bytes_transferred) {
@@ -300,7 +300,7 @@ struct http_async_connection
300
300
return ;
301
301
}
302
302
case headers:
303
- if (ec == asio::error::eof) return ;
303
+ if (ec == :: asio::error::eof) return ;
304
304
// In the following, remainder is the number of bytes that remain in
305
305
// the buffer. We need this in the body processing to make sure that
306
306
// the data remaining in the buffer is dealt with before another call
@@ -352,7 +352,7 @@ struct http_async_connection
352
352
353
353
auto self = this ->shared_from_this ();
354
354
delegate_->read_some (
355
- asio::mutable_buffers_1 (this ->part .data (),
355
+ :: asio::mutable_buffers_1 (this ->part.data(),
356
356
this->part.size()),
357
357
request_strand_.wrap([=] (std::error_code const &ec,
358
358
std::size_t bytes_transferred) {
@@ -374,7 +374,7 @@ struct http_async_connection
374
374
}
375
375
return ;
376
376
case body:
377
- if (ec == asio::error::eof || is_ssl_short_read_error) {
377
+ if (ec == :: asio::error::eof || is_ssl_short_read_error) {
378
378
// Here we're handling the case when the connection has been closed
379
379
// from the server side, or at least that the end of file has been
380
380
// reached while reading the socket. This signals the end of the
@@ -420,7 +420,7 @@ struct http_async_connection
420
420
callback (make_iterator_range (begin, end), ec);
421
421
auto self = this ->shared_from_this ();
422
422
delegate_->read_some (
423
- asio::mutable_buffers_1 (this ->part .data (),
423
+ :: asio::mutable_buffers_1 (this ->part.data(),
424
424
this->part.size()),
425
425
request_strand_.wrap([=] (std::error_code const &ec,
426
426
std::size_t bytes_transferred) {
@@ -446,7 +446,7 @@ struct http_async_connection
446
446
BOOST_ASSERT (false && " Bug, report this to the developers!" );
447
447
}
448
448
} else {
449
- std::system_error error (is_timedout_ ? asio::error::timed_out
449
+ std::system_error error (is_timedout_ ? :: asio::error::timed_out
450
450
: ec);
451
451
this ->source_promise .set_exception (std::make_exception_ptr (error));
452
452
this ->destination_promise .set_exception (std::make_exception_ptr (error));
@@ -506,14 +506,14 @@ struct http_async_connection
506
506
}
507
507
508
508
int timeout_;
509
- asio::deadline_timer timer_;
509
+ :: asio::deadline_timer timer_;
510
510
bool is_timedout_;
511
511
bool follow_redirect_;
512
512
resolver_type& resolver_;
513
513
resolve_function resolve_;
514
- asio::io_service::strand request_strand_;
514
+ :: asio::io_service::strand request_strand_;
515
515
connection_delegate_ptr delegate_;
516
- asio::streambuf command_streambuf;
516
+ :: asio::streambuf command_streambuf;
517
517
string_type method;
518
518
};
519
519
0 commit comments