From: Fabian Keil <fk@fabiankeil.de>
Date: Mon, 28 Sep 2020 11:56:43 +0000 (+0200)
Subject: send_https_request(): Call receive_and_send_encrypted_post_data() if
X-Git-Tag: v_3_0_29~73
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/developer-manual/static/faq/static/@default-cgi@?a=commitdiff_plain;h=4ae1715fb1f3408505df61e152119535debafb6d;p=privoxy.git

send_https_request(): Call receive_and_send_encrypted_post_data() if

... nothing was flushed but we're expecting a request body.

Previously we would only call receive_and_send_encrypted_post_data()
if we flushed part of the request body which does not work if the
client headers are read without a single byte of request body.
---

diff --git a/jcc.c b/jcc.c
index b6c1c109..2455ec0c 100644
--- a/jcc.c
+++ b/jcc.c
@@ -2168,7 +2168,7 @@ static int send_https_request(struct client_state *csp)
          csp->http->hostport);
       return 1;
    }
-   if (flushed != 0)
+   if (flushed != 0 || csp->expected_client_content_length != 0)
    {
       if (csp->expected_client_content_length != 0)
       {