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

Commit792f0d0

Browse files
committed
Fixescpp-netlib#78 -- short reads with Asio+OpenSSL.
1 parent868dd23 commit792f0d0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,16 @@ 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+
staticlong short_read_error =335544539;
203+
bool is_ssl_short_read_error =
204+
#ifdef BOOST_NETWORK_ENABLE_HTTPS
205+
ec.category() == asio::error::ssl_category &&
206+
ec.value() == short_read_error
207+
#else
208+
false
209+
#endif
210+
;
211+
if (!ec || ec == boost::asio::error::eof || is_ssl_short_read_error) {
203212
logic::tribool parsed_ok;
204213
size_t remainder;
205214
switch(state) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp