From 9f13f4b9706b231be792217dabc67adb702eb2ad Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk@fabiankeil.de>
Date: Wed, 31 Mar 2021 08:54:47 +0200
Subject: [PATCH] remove_chunked_transfer_coding(): Improve two log messages

---
 filters.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/filters.c b/filters.c
index ab200384..07830c3d 100644
--- a/filters.c
+++ b/filters.c
@@ -2180,7 +2180,9 @@ static jb_err remove_chunked_transfer_coding(char *buffer, size_t *size)
        */
       if (NULL == (from_p = strstr(from_p, "\r\n")))
       {
-         log_error(LOG_LEVEL_ERROR, "Parse error while stripping \"chunked\" transfer coding");
+         log_error(LOG_LEVEL_ERROR,
+            "Failed to strip \"chunked\" transfer coding. "
+            "Line with chunk size doesn't seem to end properly.");
          return JB_ERR_PARSE;
       }
       from_p += 2;
@@ -2195,7 +2197,8 @@ static jb_err remove_chunked_transfer_coding(char *buffer, size_t *size)
       if (from_p + chunksize >= end_of_buffer)
       {
          log_error(LOG_LEVEL_ERROR,
-            "End of chunk is beyond the end of the buffer.");
+            "Failed to decode content for filtering. "
+            "One chunk end is beyond the end of the buffer.");
          return JB_ERR_PARSE;
       }
 
-- 
2.49.0