]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't use CURLOPT_PUT, it does extra things we don't want
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 23 Oct 2015 21:15:14 +0000 (17:15 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 23 Oct 2015 21:16:20 +0000 (17:16 -0400)
src/modules/rlm_rest/rest.c

index eb6837565a551c1e36e126d023aac417fc9a3c72..918ca09eb047cb7cb7c37a79075ae4259bacdc8a 100644 (file)
@@ -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: