6.0.0-beta1
7/5/25

[#11770] Cannot download files with spaces
Summary Cannot download files with spaces
Queue Gollem
Queue Version 3.0.0RC1
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester max (at) mxnet (dot) co (dot) nz
Created 11/28/2012 (4602 days ago)
Due
Updated 11/29/2012 (4601 days ago)
Assigned 11/29/2012 (4601 days ago)
Resolved 11/29/2012 (4601 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
11/29/2012 07:56:05 PM max (at) mxnet (dot) co (dot) nz Comment #6 Reply to this comment

[Show Quoted Text - 13 lines]
Many thanks for fixing this. The change in GIT has worked perfectly!
11/29/2012 04:56:47 PM Jan Schneider State ⇒ Resolved
 
11/29/2012 04:40:24 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (master):

commit 21ddb969248959b90882322d4441f1a6222a6ffe
Author: Jan Schneider <jan@horde.org>
Date:   Thu Nov 29 17:37:05 2012 +0100

     Don't double-encode filename (Bug #11770).

  framework/Core/lib/Horde/Registry.php |    2 +-
  framework/Core/package.xml            |    2 ++
  2 files changed, 3 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/21ddb969248959b90882322d4441f1a6222a6ffe
11/29/2012 03:27:19 PM Jan Schneider Comment #4
Assigned to Jan Schneider
Summary ⇒ Cannot download files with spaces
State ⇒ Assigned
Reply to this comment
Not related to backend.
11/28/2012 10:35:11 PM max (at) mxnet (dot) co (dot) nz Comment #3 Reply to this comment
Works for me, even for weird chars (ùéà...)
Wish I could say the same. Thank you very much for your input and assistance.
1- check your smb.conf charset parameters:
         dos charset = 850
         unix charset = UTF-8
         display charset = UTF-8
Is this on the Horde server's smb.conf file or on the actual samba 
server's smb.conf file?
I added the above options to the horde machine's (smbclient) smb.conf 
file and it made no difference.
2- did you install mbstring & iconv extensions with php?
Yes I did and I just checked that they're both enabled in phpinfo()

mbstring
Multibyte Support        enabled
Multibyte string engine        libmbfl
HTTP input encoding translation        disabled

iconv
iconv support        enabled
iconv implementation        glibc
iconv library version        2.11.3
11/28/2012 07:42:27 AM paul (dot) de_vlieger (at) moniut (dot) univ-bpclermont (dot) fr Comment #2 Reply to this comment
Works for me, even for weird chars (ùéà...)

1- check your smb.conf charset parameters:
         dos charset = 850
         unix charset = UTF-8
         display charset = UTF-8

2- did you install mbstring & iconv extensions with php?
11/28/2012 01:08:37 AM max (at) mxnet (dot) co (dot) nz Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Cannot download files with spaces using smb backend
Queue ⇒ Gollem
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
When I try to download a file who's name includes a space with gollem 
using the smb backend I get this error

A fatal error has occurred
1. Horde_Registry->callAppMethod() 
/var/www/horde/services/download/index.php:33
2. call_user_func_array() /usr/share/php/Horde/Registry.php:1139
3. Gollem_Application->download()
4. Horde_Vfs_Smb->readStream() /var/www/horde/gollem/lib/Application.php:316
5. Horde_Vfs_Smb->readFile() /usr/share/php/Horde/Vfs/Smb.php:133
6. Horde_Vfs_Smb->_command() /usr/share/php/Horde/Vfs/Smb.php:113
7. Horde_Vfs_Smb->_execute() /usr/share/php/Horde/Vfs/Smb.php:603

In this case, I'm downloading a file called "test space.jpg"

The url reads:
https://hordeaddress/services/download/?app=gollem&dir=%2F&driver=smb&fn=%2Ftest%2520space.xlsx

The filename in the address looks wrong. it should end with:
"fn=%2Ftest%20space.xlsx"
instead of
"fn=%2Ftest%2520space.xlsx"

If I edit the url and remove the "52" (I don't know where that came 
from) and hit enter, the browser immediately downloads the file.

Saved Queries