Skip to content

Commit ceaa168

Browse files
committed
Change content_type_2 to cstr
1 parent 887f0b2 commit ceaa168

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

http.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,18 +1161,18 @@ Datum http_request(PG_FUNCTION_ARGS)
11611161
{
11621162
text *content_text;
11631163
long content_size;
1164-
char *content_type_2;
1164+
char *cstr;
11651165
char buffer[1024];
11661166

11671167
/* Read the content type */
11681168
if ( nulls[REQ_CONTENT_TYPE] || ! values[REQ_CONTENT_TYPE] )
11691169
elog(ERROR, "http_request.content_type is NULL");
1170-
content_type_2 = TextDatumGetCString(values[REQ_CONTENT_TYPE]);
1170+
cstr = TextDatumGetCString(values[REQ_CONTENT_TYPE]);
11711171

11721172
/* Add content type to the headers */
1173-
snprintf(buffer, sizeof(buffer), "Content-Type: %s", content_type_2);
1173+
snprintf(buffer, sizeof(buffer), "Content-Type: %s", cstr);
11741174
headers = curl_slist_append(headers, buffer);
1175-
pfree(content_type_2);
1175+
pfree(cstr);
11761176

11771177
/* Read the content */
11781178
content_text = DatumGetTextP(values[REQ_CONTENT]);

0 commit comments

Comments
 (0)