diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2023-05-07 03:27:50 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2023-05-07 03:29:42 -0400 |
commit | 607057dd9e10eefbf78a7ebf4229ffaaa9735a5a (patch) | |
tree | 6f375cd1a15763f36be7da1d096afd010881809b | |
parent | bdfbcbf23307463e9d0fc2426d64ced2c8acd4e4 (diff) | |
download | lighttpd-git-607057dd9e10eefbf78a7ebf4229ffaaa9735a5a.tar.gz |
[core] fix HTTP/2 use of http_response_loop()
(bug recently reached master branch; not released)
-rw-r--r-- | src/h2.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -3201,10 +3201,14 @@ h2_process_streams (connection * const con, switch (r->state) { case CON_STATE_READ_POST: case CON_STATE_HANDLE_REQUEST: - if (http_response_loop(r) > HANDLER_WAIT_FOR_EVENT) { - /* HANDLER_ERROR or HANDLER_COMEBACK (not expected) */ - request_set_state_error(r, CON_STATE_ERROR); - break; + { + const handler_t rc = http_response_loop(r); + if (rc >= HANDLER_WAIT_FOR_EVENT) { + if (rc > HANDLER_WAIT_FOR_EVENT) + /*HANDLER_ERROR or HANDLER_COMEBACK (not expected)*/ + request_set_state_error(r, CON_STATE_ERROR); + break; + } } /*__attribute_fallthrough__*/ /*case CON_STATE_RESPONSE_START:*//*occurred;transient*/ |