summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-08-19 11:09:55 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-08-19 11:09:55 +0200
commit89c928c3bef9a44135b18b83deb61dac87bd5d6d (patch)
tree08f4dc6cf7341f334ded8d6f0a401b25e2825e61 /apps
parenta1d5aba5fd3795a6ee4a87c96abf0d35d3f8116d (diff)
downloadnextcloud-server-89c928c3bef9a44135b18b83deb61dac87bd5d6d.tar.gz
nextcloud-server-89c928c3bef9a44135b18b83deb61dac87bd5d6d.zip
replace ' ' with '%20' in urls for curl
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/webdav.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index f98be318f1c..74a323af286 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -171,7 +171,7 @@ class DAV extends \OC\Files\Storage\Common{
$curl = curl_init();
$fp = fopen('php://temp', 'r+');
curl_setopt($curl, CURLOPT_USERPWD, $this->user.':'.$this->password);
- curl_setopt($curl, CURLOPT_URL, $this->createBaseUri().$path);
+ curl_setopt($curl, CURLOPT_URL, $this->createBaseUri().str_replace(' ', '%20', $path));
curl_setopt($curl, CURLOPT_FILE, $fp);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
@@ -256,7 +256,7 @@ class DAV extends \OC\Files\Storage\Common{
$curl = curl_init();
curl_setopt($curl, CURLOPT_USERPWD, $this->user.':'.$this->password);
- curl_setopt($curl, CURLOPT_URL, $this->createBaseUri().$target);
+ curl_setopt($curl, CURLOPT_URL, $this->createBaseUri().str_replace(' ', '%20', $target));
curl_setopt($curl, CURLOPT_BINARYTRANSFER, true);
curl_setopt($curl, CURLOPT_INFILE, $source); // file pointer
curl_setopt($curl, CURLOPT_INFILESIZE, filesize($path));