[Privoxy-commits] [privoxy] 08/19: process_encrypted_request(): Improve error message

User Git git at git.privoxy.org
Sun Jan 10 15:50:47 UTC 2021


This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository privoxy.

commit 008f9c881691d244c7c513257cd8f9461114622f
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Thu Jan 7 14:48:10 2021 +0100

    process_encrypted_request(): Improve error message
    
    ... emitted when the rewritten request line is invalid.
    
    While at it, emit a LOG_LEVEL_CLF message.
---
 jcc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/jcc.c b/jcc.c
index c824d948..75459e8e 100644
--- a/jcc.c
+++ b/jcc.c
@@ -2812,11 +2812,15 @@ static jb_err process_encrypted_request(struct client_state *csp)
       || (strcmp(csp->http->cmd, csp->https_headers->first->str) &&
          (JB_ERR_OK != change_encrypted_request_destination(csp))))
    {
-      log_error(LOG_LEVEL_ERROR,
-         "Failed to get the request destination in the rewritten headers");
       ssl_send_data_delayed(&(csp->ssl_client_attr),
          (const unsigned char *)MESSED_UP_REQUEST_RESPONSE,
          strlen(MESSED_UP_REQUEST_RESPONSE), get_write_delay(csp));
+      log_error(LOG_LEVEL_ERROR,
+         "Invalid request line after applying header filters.");
+      /* XXX: Use correct size */
+      log_error(LOG_LEVEL_CLF,
+         "%s - - [%T] \"Invalid request generated\" 400 0", csp->ip_addr_str);
+
       return JB_ERR_PARSE;
    }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Privoxy-commits mailing list