From 887f0b26d3094ad5bc9a3c310ae90a9a54085492 Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Sun, 30 Jul 2023 23:50:00 -0400 Subject: [PATCH] MINOR FIXES - Start testing PG16 - Fix content_type shadowing --- .github/workflows/ci.yml | 1 + http.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1853d5d..f4d49e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,7 @@ jobs: - { PGVER: 13 } - { PGVER: 14 } - { PGVER: 15 } + - { PGVER: 16 } steps: diff --git a/http.c b/http.c index 0401710..254aae7 100644 --- a/http.c +++ b/http.c @@ -1161,18 +1161,18 @@ Datum http_request(PG_FUNCTION_ARGS) { text *content_text; long content_size; - char *content_type; + char *content_type_2; char buffer[1024]; /* Read the content type */ if ( nulls[REQ_CONTENT_TYPE] || ! values[REQ_CONTENT_TYPE] ) elog(ERROR, "http_request.content_type is NULL"); - content_type = TextDatumGetCString(values[REQ_CONTENT_TYPE]); + content_type_2 = TextDatumGetCString(values[REQ_CONTENT_TYPE]); /* Add content type to the headers */ - snprintf(buffer, sizeof(buffer), "Content-Type: %s", content_type); + snprintf(buffer, sizeof(buffer), "Content-Type: %s", content_type_2); headers = curl_slist_append(headers, buffer); - pfree(content_type); + pfree(content_type_2); /* Read the content */ content_text = DatumGetTextP(values[REQ_CONTENT]);