{"push_id":1090911289,"size":3,"distinct_size":3,"ref":"refs/heads/master","head":"53656bf5197aab3544c04e606196fcd5c5cd02b5","before":"889ca14f5f7343aacfd3d385092621c22869de95","commits":[{"sha":"e9ea4dbee2f6ae72c6a73996b3030d58f47216a3","author":{"email":"848f5fe31f481418db38a7b0daaf94bb02f0ff7b@gmail.com","name":"Jesse Skrivseth"},"message":"Don't use CURLOPT_CUSTOMREQUEST for POSTs\n\nI think the current usage of CURLOPT_CUSTOMREQUEST is wrong. As far as I can tell CURLOPT_CUSTOMREQUEST = Method::POST is not the same thing as CURLOPT_POST = true. \r\n\r\nI struggled for hours with POSTed data not being accepted by IIS. First IIS threw an HTTP 411 due to curl not sending a Content-Length header. That is solved by replacing CURLOPT_CUSTOMREQUEST with CURLOPT_POST in the case of actual POSTs. Also, IIS in my case returns an HTTP 301 redirect, which I need Unirest to follow, so I set the CURLOPT_POSTREDIR = 3 in order to let the POST follow on redirect via 301 or 302. \r\n\r\nNotice this: https://curl.haxx.se/libcurl/c/CURLOPT_CUSTOMREQUEST.html - \"Many people have wrongly used this option to replace the entire request with their own, including multiple headers and POST contents. While that might work in many cases, it will cause libcurl to send invalid requests and it could possibly confuse the remote server badly. Use CURLOPT_POST and CURLOPT_POSTFIELDS to set POST data. Use CURLOPT_HTTPHEADER to replace or extend the set of headers sent by libcurl. Use CURLOPT_HTTP_VERSION to change HTTP version.\"\r\n\r\nIn any case, I know that the CURLOPT_POSTREDIR option probably shouldn't go here and should be client configurable, but I can't find a good place for it. It would be nice to have one-shot $curlOpts passed in with the send method, or curlOpts() that otherwise live for only one curl_exec().","distinct":true,"url":"https://api.github.com/repos/Mashape/unirest-php/commits/e9ea4dbee2f6ae72c6a73996b3030d58f47216a3"},{"sha":"a3446f6d997cca7f76caa0b9f09c62d6db0a2c51","author":{"email":"848f5fe31f481418db38a7b0daaf94bb02f0ff7b@gmail.com","name":"Jesse Skrivseth"},"message":"Update Request.php\n\nRemove curl_setopt(self::$handle, CURLOPT_POSTREDIR, 3);  in favor of the caller being well-behaved and setting this option as needed","distinct":true,"url":"https://api.github.com/repos/Mashape/unirest-php/commits/a3446f6d997cca7f76caa0b9f09c62d6db0a2c51"},{"sha":"53656bf5197aab3544c04e606196fcd5c5cd02b5","author":{"email":"a53a33601b8dd9d06ae9e50f1f30fbe957aba866@ahmadnassri.com","name":"Ahmad Nassri"},"message":"Merge pull request #105 from voodoodrul/patch-2\n\nDon't use CURLOPT_CUSTOMREQUEST for POSTs","distinct":true,"url":"https://api.github.com/repos/Mashape/unirest-php/commits/53656bf5197aab3544c04e606196fcd5c5cd02b5"}]}