X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=jcc.c;h=bb57dedb5fc9acfc0785c214f3717ac183d07c76;hp=4119e4a5f69bd3f913e68379b04ee3aa40d14eef;hb=b23820b98f95fe68176ec2706f05e1044bac3900;hpb=0c82acb57e75e9a1463b4b6b56e7709752c63f89 diff --git a/jcc.c b/jcc.c index 4119e4a5..bb57dedb 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) { @@ -2292,7 +2292,8 @@ static jb_err process_encrypted_request(struct client_state *csp) err = receive_encrypted_request(csp); if (err != JB_ERR_OK) { - if (csp->client_iob->cur == NULL) + if (csp->client_iob->cur == NULL || + csp->client_iob->cur == csp->client_iob->eod) { /* * We did not receive any data, most likely because the @@ -4118,10 +4119,12 @@ static void chat(struct client_state *csp) else { /* - * If server certificate is invalid, we must inform client and then - * close connection with client. + * If server certificate has been verified and is invalid, + * we must inform the client and then close the connection + * with client and server. */ - if (csp->server_cert_verification_result != SSL_CERT_VALID) + if (csp->server_cert_verification_result != SSL_CERT_VALID && + csp->server_cert_verification_result != SSL_CERT_NOT_VERIFIED) { ssl_send_certificate_error(csp); close_client_and_server_ssl_connections(csp);