]> 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)
committerJoshua Colp <jcolp@sangoma.com>
Wed, 23 Sep 2020 15:05:01 +0000 (10:05 -0500)
commit7bd079e542c5ddc5727f5110355d32709ceb2c55
tree07828be62f8d245c3b67e166839b43c9cc4f3974
parent6ba11fed7e47c660c34e4fcdfbf05d42130516da
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