Skip to content

Commit

Permalink
Merge pull request pramsey#162 from robe2/fix-warnings-pg16
Browse files Browse the repository at this point in the history
 MINOR FIXES and add PG16 testing
  • Loading branch information
pramsey authored Aug 4, 2023
2 parents 3449283 + ceaa168 commit 01d4431
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- { PGVER: 13 }
- { PGVER: 14 }
- { PGVER: 15 }
- { PGVER: 16 }

steps:

Expand Down
8 changes: 4 additions & 4 deletions http.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,18 +1161,18 @@ Datum http_request(PG_FUNCTION_ARGS)
{
text *content_text;
long content_size;
char *content_type;
char *cstr;
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]);
cstr = 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", cstr);
headers = curl_slist_append(headers, buffer);
pfree(content_type);
pfree(cstr);

/* Read the content */
content_text = DatumGetTextP(values[REQ_CONTENT]);
Expand Down

0 comments on commit 01d4431

Please sign in to comment.