From: Arran Cudbard-Bell Date: Fri, 23 Oct 2015 21:15:14 +0000 (-0400) Subject: Don't use CURLOPT_PUT, it does extra things we don't want X-Git-Tag: release_3_0_11~208 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c60e20e20731c745e9005fd236daa5c3e1596719;p=thirdparty%2Ffreeradius-server.git Don't use CURLOPT_PUT, it does extra things we don't want --- diff --git a/src/modules/rlm_rest/rest.c b/src/modules/rlm_rest/rest.c index eb6837565a5..918ca09eb04 100644 --- a/src/modules/rlm_rest/rest.c +++ b/src/modules/rlm_rest/rest.c @@ -2042,7 +2042,16 @@ int rest_request_config(rlm_rest_t *instance, rlm_rest_section_t *section, break; case HTTP_METHOD_PUT: - SET_OPTION(CURLOPT_PUT, 1L); + /* + * Do not set CURLOPT_PUT, this will cause libcurl + * to ignore CURLOPT_POSTFIELDs and attempt to read + * whatever was set with CURLOPT_READDATA, which by + * default is stdin. + * + * This is many cases will cause the server to block, + * indefinitely. + */ + SET_OPTION(CURLOPT_CUSTOMREQUEST, "PUT"); break; case HTTP_METHOD_PATCH: