Skip to content

Commit

Permalink
Don't use CURLOPT_PUT, it does extra things we don't want
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Oct 23, 2015
1 parent be7d4f9 commit f1af279
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/modules/rlm_rest/rest.c
Original file line number Diff line number Diff line change
Expand Up @@ -2068,7 +2068,16 @@ int rest_request_config(rlm_rest_t const *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:
Expand Down

0 comments on commit f1af279

Please sign in to comment.