From ce0a247decdfc2ac681ba8b879a6f99ab1bf276f Mon Sep 17 00:00:00 2001 From: Uku Loskit Date: Thu, 1 Feb 2024 00:14:27 +0200 Subject: [PATCH] Remove SSL targets variable --- extensions/omni_httpc/omni_httpc.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/extensions/omni_httpc/omni_httpc.c b/extensions/omni_httpc/omni_httpc.c index 93d2ab358..49e3e8cc1 100644 --- a/extensions/omni_httpc/omni_httpc.c +++ b/extensions/omni_httpc/omni_httpc.c @@ -237,9 +237,9 @@ struct request { // Called when response body chunk is being received static int on_body(h2o_httpclient_t *client, const char *errstr, h2o_header_t *trailers, size_t num_trailers) { - struct request *req = (struct request *)client->data; + // If there's an error, report it if (errstr != NULL) { if (errstr != h2o_httpclient_error_is_eos) { @@ -508,9 +508,6 @@ Datum http_execute(PG_FUNCTION_ARGS) { int num_requests = ArrayGetNItems(ARR_NDIM(requests_array), ARR_DIMS(requests_array)); struct request *requests = palloc_array(struct request, num_requests); - // Indicates if any target requires SSL - bool ssl_targets = false; - bool any_requests = false; // For every request: for (int req_i = 0; req_i < num_requests; req_i++) { @@ -611,11 +608,6 @@ Datum http_execute(PG_FUNCTION_ARGS) { h2o_add_header(pool, headers_vec, H2O_TOKEN_CONTENT_LENGTH, NULL, clbuf, clbuf_len); } - // If request requires SSL, take a note of that - if (request->url.scheme->is_ssl) { - ssl_targets = true; - } - request->done = &done; request->errstr = NULL; request->num_headers = headers_vec->size;