send_https_request(): Call receive_and_send_encrypted_post_data() if
authorFabian Keil <fk@fabiankeil.de>
Mon, 28 Sep 2020 11:56:43 +0000 (13:56 +0200)
committerFabian Keil <fk@fabiankeil.de>
Mon, 28 Sep 2020 13:13:47 +0000 (15:13 +0200)
... 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.

jcc.c

diff --git a/jcc.c b/jcc.c
index b6c1c10..2455ec0 100644 (file)
--- 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)
       {