Skip to content

Commit 9116322

Browse files
committed
catch exceptions in parse_headers
1 parent 6f229d8 commit 9116322

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)