#include "plugin.h"
#include "common.h"
#include "utils_cache.h"
-#include "utils_parse_option.h"
#include "utils_format_json.h"
#if HAVE_PTHREAD_H
curl_easy_setopt (cb->curl, CURLOPT_ERRORBUFFER, cb->curl_errbuf);
curl_easy_setopt (cb->curl, CURLOPT_URL, cb->location);
+ curl_easy_setopt (cb->curl, CURLOPT_FOLLOWLOCATION, 1L);
+ curl_easy_setopt (cb->curl, CURLOPT_MAXREDIRS, 50L);
if (cb->user != NULL)
{
/* Allocate the buffer. */
cb->send_buffer = malloc (cb->send_buffer_size);
- if (cb->send_buffer == 0)
+ if (cb->send_buffer == NULL)
{
ERROR ("write_http plugin: malloc(%zu) failed.", cb->send_buffer_size);
wh_callback_free (cb);