Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5eb9b55

Browse files
deanberrisglynos
authored andcommitted
Reverting unnecessary assertion.
1 parentb02620c commit5eb9b55

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

‎boost/network/protocol/http/client/connection/async_normal.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ namespace boost { namespace network { namespace http { namespace impl {
199199
}
200200

201201
voidhandle_received_data(state_t state,bool get_body, body_callback_function_type callback, boost::system::error_codeconst & ec, std::size_t bytes_transferred) {
202-
if (!ec || ec == boost::asio::error::eof) {
202+
if (!ec || ec == boost::asio::error::eof) {
203203
logic::tribool parsed_ok;
204204
size_t remainder;
205205
switch(state) {

‎boost/network/protocol/http/client/connection/sync_base.hpp‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ namespace boost { namespace network { namespace http { namespace impl {
132132
bool stopping =false;
133133
do {
134134
std::size_t chunk_size_line =read_until(socket_, response_buffer,"\r\n", error);
135-
std::size_t tooMuchRead = response_buffer.size() - chunk_size_line;
136135
if ((chunk_size_line ==0) && (error != boost::asio::error::eof))throwboost::system::system_error(error);
137136
std::size_t chunk_size =0;
138137
string_type data;
@@ -149,8 +148,7 @@ namespace boost { namespace network { namespace http { namespace impl {
149148
}else {
150149
bool stopping_inner =false;
151150
do {
152-
assert( tooMuchRead <= chunk_size +2 );
153-
std::size_t chunk_bytes_read =read(socket_, response_buffer,boost::asio::transfer_at_least(chunk_size +2 - tooMuchRead), error);
151+
std::size_t chunk_bytes_read =read(socket_, response_buffer,boost::asio::transfer_at_least(chunk_size), error);
154152
if (chunk_bytes_read ==0) {
155153
if (error != boost::asio::error::eof)throwboost::system::system_error(error);
156154
stopping_inner =true;

‎libs/network/test/http/client_get_test.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(https_client_get_test, client, client_types) {
3232
typename client::response response_ = client_.get(request);
3333
typename net::headers_range<typename client::response>::type range =headers(response_)["Content-Type"];
3434
BOOST_CHECK (boost::begin(range) !=boost::end(range) );
35-
BOOST_REQUIRE_NO_THROW (BOOST_CHECK(body(response_).size() !=0 ) );
35+
BOOST_CHECK(body(response_).size() !=0 );
3636
}
3737

3838
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp