Do not return HPE_USER from where it is prohibited
This commit is contained in:
parent
20079b4c2f
commit
43a47aa08b
|
@ -891,8 +891,7 @@ int htp_msg_begincb(llhttp_t *htp) {
|
||||||
auto downstream = static_cast<Downstream *>(htp->data);
|
auto downstream = static_cast<Downstream *>(htp->data);
|
||||||
|
|
||||||
if (downstream->get_response_state() != DownstreamState::INITIAL) {
|
if (downstream->get_response_state() != DownstreamState::INITIAL) {
|
||||||
llhttp_set_error_reason(htp, "HTTP message started when it shouldn't");
|
return -1;
|
||||||
return HPE_USER;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -559,8 +559,7 @@ int htp_msg_completecb(llhttp_t *htp) {
|
||||||
// signal_write() to run on_write().
|
// signal_write() to run on_write().
|
||||||
return HPE_PAUSED;
|
return HPE_PAUSED;
|
||||||
}
|
}
|
||||||
llhttp_set_error_reason(htp, "could not finish request body");
|
return -1;
|
||||||
return HPE_USER;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handler->get_http2_upgrade_allowed() &&
|
if (handler->get_http2_upgrade_allowed() &&
|
||||||
|
|
Loading…
Reference in New Issue