Skip to content

Commit

Permalink
remove not needed flag
Browse files Browse the repository at this point in the history
  • Loading branch information
cyga committed Feb 27, 2016
1 parent 4dfe2f5 commit 6b8eebe
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/www_fdw.c
Expand Up @@ -1736,7 +1736,6 @@ www_begin(ForeignScanState *node, int eflags)
Datum opts_value = 0;
PostParameters post;
struct curl_slist *curl_opts = NULL;
int header_set = 0;

d("www_begin routine");

Expand Down Expand Up @@ -1790,7 +1789,6 @@ www_begin(ForeignScanState *node, int eflags)
if(opts->request_user_header)
{
curl_opts = curl_slist_append(curl_opts, opts->request_user_header);
header_set = 1;
}

if(post.post || 0 == strcmp(opts->method_select, "POST"))
Expand All @@ -1800,12 +1798,11 @@ www_begin(ForeignScanState *node, int eflags)
{
curl_opts = curl_slist_append(curl_opts, "Content-type:");
curl_opts = curl_slist_append(curl_opts, post.content_type.data);
header_set = 1;
}
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post.data.data);
}

if( header_set )
if( curl_opts )
{
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, curl_opts);
}
Expand Down

0 comments on commit 6b8eebe

Please sign in to comment.