-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Content-Lenth and Content-Type in bodyless message
RFC 9110 8.6: A server MUST NOT send a Content-Length header field in any response with a status code of 1xx (Informational) or 204 (No Content). Now for responses 1xx and 204 Tempesta FW treats `Content-Length: 0` as the absence of a Content-Length header. Some implementations send `Content-Length: 0` within 204 (No Content) response, to be able to process such messages the rule from RFC 9110 8.6 has been relaxed. For requests with bodyless methods such as HEAD, GET, etc. Tempesta also treats `Content-Length: 0` as empty body and considers such requests as valid. Added directive `allow_empty_body_content_type` that allows Tempesta FW to process requests with bodyless methods. By default Tempesta FW drops such requests.
- Loading branch information
Showing
4 changed files
with
54 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Tempesta FW | ||
* | ||
* Copyright (C) 2014 NatSys Lab. ([email protected]). | ||
* Copyright (C) 2015-2024 Tempesta Technologies, Inc. | ||
* Copyright (C) 2015-2025 Tempesta Technologies, Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by | ||
|
@@ -736,6 +736,7 @@ typedef void (*tfw_http_cache_cb_t)(TfwHttpMsg *); | |
(TFW_MSG_H2(hmmsg) ? HTTP2_EXTRA_HDR_OVERHEAD : 0) | ||
|
||
extern unsigned int max_header_list_size; | ||
extern bool allow_empty_body_content_type; | ||
|
||
/* External HTTP functions. */ | ||
int tfw_http_msg_process(TfwConn *conn, struct sk_buff *skb, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters