Skip to content

Commit

Permalink
fix setting the variable of User-Agent, it was missing the prefix. Sw…
Browse files Browse the repository at this point in the history
…itched to dedicated curl's method to do this

Signed-off-by: Marcin Kowalski <marcin.kowalski@assecobs.pl>
  • Loading branch information
yoshi314 authored and Marcin Kowalski committed Jan 14, 2022
1 parent 2ea6411 commit 2cc626c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion userspace/falco/outputs_http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ void falco::outputs::output_http::output(const message *msg)
} else {
slist1 = curl_slist_append(slist1, "Content-Type: text/plain");
}
slist1 = curl_slist_append(slist1, m_oc.options["user_agent"].c_str());

curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist1);
curl_easy_setopt(curl, CURLOPT_URL, m_oc.options["url"].c_str());
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, msg->msg.c_str());
curl_easy_setopt(curl, CURLOPT_USERAGENT, m_oc.options["user_agent"].c_str());
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, -1L);


Expand Down

0 comments on commit 2cc626c

Please sign in to comment.