]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_curl.c: Prevent crash when using CURLOPT(httpheader)
authorSean Bright <sean.bright@gmail.com>
Fri, 18 Sep 2020 13:09:59 +0000 (09:09 -0400)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Wed, 23 Sep 2020 13:07:10 +0000 (08:07 -0500)
commit59492c475c4d9b055ec1ce919ea13105e1ce4207
treebee9ad8cfb3d8e3696f90a49bb16c1416d04abad
parent9decb3353103f8333b0fb6ad5e23ae8a729dc74b
func_curl.c: Prevent crash when using CURLOPT(httpheader)

Because we use shared thread-local cURL instances, we need to ensure
that the state of the cURL instance is correct before each invocation.

In the case of custom headers, we were not resetting cURL's internal
HTTP header pointer which could result in a crash if subsequent
requests do not configure custom headers.

ASTERISK-29085 #close

Change-Id: I8b4ab34038156dfba613030a45f10e932d2e992d
funcs/func_curl.c