commit 76ded6d: [Minor] Small tweaks for maps read logic

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Sep 17 14:21:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-09-17 15:00:16 +0100
URL: https://github.com/rspamd/rspamd/commit/76ded6d52cd1a762280393fb79a1cde4539e00dd

[Minor] Small tweaks for maps read logic

---
 src/libutil/http_connection.c | 3 ++-
 src/libutil/map.c             | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libutil/http_connection.c b/src/libutil/http_connection.c
index 475a09c41..6bb6aa7db 100644
--- a/src/libutil/http_connection.c
+++ b/src/libutil/http_connection.c
@@ -374,7 +374,8 @@ rspamd_http_on_headers_complete (http_parser * parser)
 	 *
 	 * Hence, we skip body setup here
 	 */
-	if (parser->content_length != ULLONG_MAX && parser->content_length != 0) {
+	if (parser->content_length != ULLONG_MAX && parser->content_length != 0 &&
+			msg->method != HTTP_HEAD) {
 		if (conn->max_size > 0 &&
 				parser->content_length > conn->max_size) {
 			/* Too large message */
diff --git a/src/libutil/map.c b/src/libutil/map.c
index 24dc2755a..19612f8ff 100644
--- a/src/libutil/map.c
+++ b/src/libutil/map.c
@@ -295,6 +295,7 @@ http_map_finish (struct rspamd_http_connection *conn,
 	if (msg->code == 200) {
 
 		if (cbd->check) {
+			msg_info_map ("need to reread map from %s", cbd->bk->uri);
 			cbd->periodic->need_modify = TRUE;
 			/* Reset the whole chain */
 			cbd->periodic->cur_backend = 0;


More information about the Commits mailing list