We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cca5a35 commit addac0bCopy full SHA for addac0b
src/HttpParser.h
@@ -501,6 +501,12 @@ struct HttpParser {
501
/* Add all headers to bloom filter */
502
req->bf.reset();
503
for (HttpRequest::Header *h = req->headers; (++h)->key.length(); ) {
504
+ if (req->bf.mightHave(h->key)) [[unlikely]] {
505
+ /* Host header is not allowed twice */
506
+ if (h->key == "host" && req->getHeader("host").data()) {
507
+ return {HTTP_ERROR_400_BAD_REQUEST, FULLPTR};
508
+ }
509
510
req->bf.add(h->key);
511
}
512
0 commit comments