Commit e521c500 authored by Alejandro Sanchez's avatar Alejandro Sanchez
Browse files

acct_gather_profile/influxdb - use curl_easy_getinfo to get response code.

Using curl_easy_getinfo with CURLINFO_RESPONSE_CODE is a cleaner and safer
way to retrieve the response code, since we don't have to manually parse
the header with strtok. This permits to disable the CURLOPT_HEADER option,
and thus chunk.message will directly contain the JSON response body without
the header, which can also be directly logged if more verbosity is needed to
know why a non-2xx response code was received (database not found, ...).

Bug 2693.
parent 1b616c41
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment