Fix on_headers called twice from basic_parser_v1

This commit is contained in:
Vinnie Falco
2016-10-09 20:29:55 -04:00
parent 113ecb0c34
commit 18eeddfab6
2 changed files with 2 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
* Make value optional in param-list * Make value optional in param-list
* Frame processing routines are member functions * Frame processing routines are member functions
* Fix on_headers called twice from basic_parser_v1
API Changes: API Changes:

View File

@@ -916,13 +916,12 @@ write(boost::asio::const_buffer const& buffer, error_code& ec)
return err(parse_error::bad_on_headers_rv); return err(parse_error::bad_on_headers_rv);
} }
s_ = s_headers_done; s_ = s_headers_done;
goto redo; // fall through
} }
case s_headers_done: case s_headers_done:
{ {
BOOST_ASSERT(! cb_); BOOST_ASSERT(! cb_);
call_on_headers(ec);
if(ec) if(ec)
return errc(); return errc();
bool const hasBody = bool const hasBody =