summaryrefslogtreecommitdiff
path: root/src/h2.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2022-03-22 00:24:20 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2022-03-25 08:43:42 -0400
commit8fe9f1c053d828f666c0498d8b4281efabe6d3a6 (patch)
tree32b21aeefda1596f19a9f546d480b74a37a4a268 /src/h2.c
parent1f4cc7476d9f76bca48f099b6465ace92e6c0f88 (diff)
downloadlighttpd-git-8fe9f1c053d828f666c0498d8b4281efabe6d3a6.tar.gz
[core] discard DATA from REFUSED_STREAM at h2 init
discard DATA from REFUSED_STREAM at h2 connection init while waiting for SETTINGS ackn from client This is not a bugfix in lighttpd, but rather is a workaround for impolite/aggressive/dumb/lazy (take your picks) client behavior. x-ref: "POST request DATA part for non-existing URI closes HTTP/2 connection prematurely" https://redmine.lighttpd.net/issues/3078 "HTTP/2 Error" https://redmine.lighttpd.net/issues/3148 "Possible HTTP/2 error - GOAWAY sent" https://redmine.lighttpd.net/issues/3149 "[WAD] HTTP/2 GOAWAY with excessive PUT requests exceeding stream concurrency limit" https://redmine.lighttpd.net/boards/2/topics/10351
Diffstat (limited to 'src/h2.c')
-rw-r--r--src/h2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/h2.c b/src/h2.c
index b579ae2b..ecb2e014 100644
--- a/src/h2.c
+++ b/src/h2.c
@@ -439,6 +439,12 @@ h2_send_refused_stream (uint32_t h2id, connection * const con)
return -1;
}
}
+ /* overload h2c->half_closed_ts to discard DATA (in h2_recv_data())
+ * from refused streams while waiting for SETTINGS ackn from client
+ * (instead of additional h2 con init time check in h2_recv_data())
+ * (though h2c->half_closed_ts is not unset when SETTINGS ackn received)
+ * (fuzzy discard; imprecise; see further comments in h2_recv_data()) */
+ h2c->half_closed_ts = h2c->sent_settings;
}
/* too many active streams; refuse new stream */