Do not return HPE_USER from where it is prohibited

This commit is contained in:
Tatsuhiro Tsujikawa 2021-05-13 13:59:44 +09:00
parent 20079b4c2f
commit 43a47aa08b
2 changed files with 2 additions and 4 deletions

View File

@ -891,8 +891,7 @@ int htp_msg_begincb(llhttp_t *htp) {
auto downstream = static_cast<Downstream *>(htp->data);
if (downstream->get_response_state() != DownstreamState::INITIAL) {
llhttp_set_error_reason(htp, "HTTP message started when it shouldn't");
return HPE_USER;
return -1;
}
return 0;

View File

@ -559,8 +559,7 @@ int htp_msg_completecb(llhttp_t *htp) {
// signal_write() to run on_write().
return HPE_PAUSED;
}
llhttp_set_error_reason(htp, "could not finish request body");
return HPE_USER;
return -1;
}
if (handler->get_http2_upgrade_allowed() &&