diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-08-19 05:13:20 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-08-19 05:13:20 -0700 |
commit | 95e1b62940444eb2a7467d994a7b4366f6e7f2fc (patch) | |
tree | 0f7cee905159d55f4a8721898bc32611c34b3f53 | |
parent | d7dde3cfbcb779f831130bdc65c8570437c73a71 (diff) | |
parent | 89c928c3bef9a44135b18b83deb61dac87bd5d6d (diff) | |
download | nextcloud-server-95e1b62940444eb2a7467d994a7b4366f6e7f2fc.tar.gz nextcloud-server-95e1b62940444eb2a7467d994a7b4366f6e7f2fc.zip |
Merge pull request #4510 from owncloud/f_e_webdav_urlencoding
Fix files_external webdav up and download when path contains ' '
-rw-r--r-- | apps/files_external/lib/webdav.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 0ef7646ace7..66920fc9f64 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)); |