[OpenSIPS-Devel] [OpenSIPS/opensips] 7bb059: Set 'CURLOPT_FAILONERROR' option to '0' in rest_cl...
Liviu Chircu
liviu at opensips.org
Fri Feb 24 09:02:15 EST 2017
Branch: refs/heads/2.2
Home: https://github.com/OpenSIPS/opensips
Commit: 7bb059fa9cbfe6222d7eb7ebad4a2d51c4a25a8b
https://github.com/OpenSIPS/opensips/commit/7bb059fa9cbfe6222d7eb7ebad4a2d51c4a25a8b
Author: Andrey Vorobiev <andrey.o.vorobiev at gmail.com>
Date: 2017-02-24 (Fri, 24 Feb 2017)
Changed paths:
M modules/rest_client/rest_methods.c
Log Message:
-----------
Set 'CURLOPT_FAILONERROR' option to '0' in rest_client module
This is done in order to archive following goals:
- suppress error log messages like 'curl_easy_perform: ...' when HTTP
server returns response with status code larger or equal to 400.
- make 'rest_xxx' functions to have the same behaviour with different
Curl distributions. Now for different Curls these functions may
return different exit codes for the same HTTP response.
There is an option in Curl named 'CURLOPT_FAILONERROR'. If it's set to
'1' then if returned HTTP code is equal to or larger than 400 the HTTP
request is considered as failed and 'curl_easy_perform' returns non
'CURLE_OK' code. In vanilla (upstream) Curl this option is set to '0'
(do not fail) but some patched Curl versions set this option to '1'
(at least this is true for Debian Wheezy). As result we have a
different behaviour for different Curl derivatives. So it seems to be
better to enforce setting this option to '0' in order to have the same
behaviour for different Curls.
Commit: 033b4f024e1b5346d6c92123194637708da7fc59
https://github.com/OpenSIPS/opensips/commit/033b4f024e1b5346d6c92123194637708da7fc59
Author: Liviu Chircu <liviu at opensips.org>
Date: 2017-02-24 (Fri, 24 Feb 2017)
Changed paths:
M modules/rest_client/rest_methods.c
Log Message:
-----------
Merge pull request #1061 from andrey-vorobiev/supress-error-for-restclient
Set 'CURLOPT_FAILONERROR' option to '0' in rest_client module
Compare: https://github.com/OpenSIPS/opensips/compare/815a81abbe50...033b4f024e1b
More information about the Devel
mailing list