[Privoxy-commits] [privoxy] 29/46: ssl_send_certificate_error(): Respect HEAD requests by not sending a body

User Git git at git.privoxy.org
Sun Feb 21 15:10:51 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 6a6fd3ac89d9090c7fa6dc959ec8540305fe71b7
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Wed Feb 10 03:39:23 2021 +0100

    ssl_send_certificate_error(): Respect HEAD requests by not sending a body
---
 ssl_common.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/ssl_common.c b/ssl_common.c
index ac146f82..a8dd371e 100644
--- a/ssl_common.c
+++ b/ssl_common.c
@@ -405,6 +405,16 @@ extern void ssl_send_certificate_error(struct client_state *csp)
    }
    strlcat(message, message_end, message_len);
 
+   if (0 == strcmpic(csp->http->gpc, "HEAD"))
+   {
+      /* Cut off body */
+      char *header_end = strstr(message, "\r\n\r\n");
+      if (header_end != NULL)
+      {
+         header_end[3] = '\0';
+      }
+   }
+
    /*
     * Sending final message to client
     */

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


More information about the Privoxy-commits mailing list