Always send a POST body

This commit is contained in:
Robin Appelman 2014-06-13 15:28:35 +02:00 committed by Bjoern Schiessle
parent be93b0d01d
commit 9670d3e98b
1 changed files with 2 additions and 4 deletions

View File

@ -28,10 +28,8 @@ class Scanner extends \OC\Files\Cache\Scanner {
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
if ($password) {
curl_setopt($ch, CURLOPT_POSTFIELDS,
http_build_query(array('password' => $password)));
}
curl_setopt($ch, CURLOPT_POSTFIELDS,
http_build_query(array('password' => $password)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);