@@ -128,7 +128,7 @@ struct http_async_connection
128
128
this ->destination_promise .set_exception (std::make_exception_ptr (error));
129
129
this ->body_promise .set_exception (std::make_exception_ptr (error));
130
130
if ( callback )
131
- callback ( boost::iterator_range<const char * >(), ec );
131
+ callback ( boost::iterator_range<typename std::array< typename char_<Tag>::type, 1024 >::const_iterator >(), ec );
132
132
this ->timer_ .cancel ();
133
133
}
134
134
@@ -321,7 +321,7 @@ struct http_async_connection
321
321
// body (in the case of a HEAD request).
322
322
this ->body_promise .set_value (" " );
323
323
if ( callback )
324
- callback ( boost::iterator_range<const char * >(), boost::asio::error::eof );
324
+ callback ( boost::iterator_range<typename std::array< typename char_<Tag>::type, 1024 >::const_iterator >(), boost::asio::error::eof );
325
325
this ->destination_promise .set_value (" " );
326
326
this ->source_promise .set_value (" " );
327
327
// this->part.assign('\0');
@@ -392,7 +392,7 @@ struct http_async_connection
392
392
} else {
393
393
string_type body_string;
394
394
std::swap (body_string, this ->partial_parsed );
395
- body_string.append (this ->part .begin (), bytes_transferred);
395
+ body_string.append (this ->part .begin (), this -> part . begin () + bytes_transferred);
396
396
if (this ->is_chunk_encoding ) {
397
397
this ->body_promise .set_value (parse_chunk_encoding (body_string));
398
398
} else {
@@ -468,7 +468,7 @@ struct http_async_connection
468
468
this ->body_promise .set_exception (std::make_exception_ptr (error));
469
469
}
470
470
else
471
- callback ( boost::iterator_range<const char * >(), report_code );
471
+ callback ( boost::iterator_range<typename std::array< typename char_<Tag>::type, 1024 >::const_iterator >(), report_code );
472
472
break ;
473
473
default :
474
474
BOOST_ASSERT (false && " Bug, report this to the developers!" );
0 commit comments