Skip to content

Commit 53f3479

Browse files
committed
Merge pull request #498 from wujunzhuo/0.11-devel
catch exceptions in handle_read_data() (fixes #497)
2 parents 6e090b3 + 9116322 commit 53f3479

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

boost/network/protocol/http/server/async_connection.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,12 @@ struct async_connection
477477
} else if (parsed_ok == true) {
478478
partial_parsed.append(boost::begin(result_range),
479479
boost::end(result_range));
480-
parse_headers(partial_parsed, request_.headers);
480+
try {
481+
parse_headers(partial_parsed, request_.headers);
482+
} catch (...) {
483+
client_error();
484+
break;
485+
}
481486
new_start = boost::end(result_range);
482487
thread_pool().post(boost::bind(
483488
&Handler::operator(), &handler, cref(request_),

0 commit comments

Comments
 (0)