Skip to content

Commit

Permalink
Remove SSL targets variable
Browse files Browse the repository at this point in the history
  • Loading branch information
UkuLoskit committed Jan 31, 2024
1 parent 7854e2c commit ce0a247
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions extensions/omni_httpc/omni_httpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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++) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ce0a247

Please sign in to comment.