Better treatment of SSL short reads:

fix #38

This improves the behavior when encountering a short read:

* Any stream error encountered during a read is converting into
  `http::error::partial_message` if some data was received but
  the message is incomplete.

* Examples squelch SSL short read errors from the logs.
This commit is contained in:
Vinnie Falco
2019-02-23 08:56:59 -08:00
parent d4dddec1c0
commit 094f5ec5cb
11 changed files with 124 additions and 5 deletions
+7
View File
@@ -73,10 +73,17 @@ public:
}
catch(system_error const& se)
{
// VFALCO Commented this out after the short
// read change, because it converts test_failure
// into http::partial_message
//
boost::ignore_unused(se);
#if 0
if(! BEAST_EXPECTS(
se.code() == test::error::test_failure,
se.code().message()))
throw;
#endif
if(! BEAST_EXPECTS(
clock_type::now() < expires_at,
"a test timeout occurred"))