Space in URL

Asked by Assem

How to mount a site including spaces in its URL, for example:

http://happy.test.com/rest/Organisation interne

I tried to add this line to the fstab file but it didn't work:

http://happy.test.com/rest/Organisation interne /home/me/mnt/OrgInterne davfs noauto,user,uid=1000,gid=1000,no_netdev 0 0

I tried also to replace the space by %20 but I got 404 error when mounting.

Any help please,

Thks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu davfs2 Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Rijckenberg
Solved:
Last query:
Last reply:
Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#1

See here:

http://linux.die.net/man/8/mount.davfs

"In fstab spaces must be replaced by a three digit octal escape sequence. Write http://foo.bar/pathrs040withrs040spaces instead of http://foo.bar/path with spaces. It might also be necessary to replace the '#'-character by rs043. Note: In earlier versions of davfs2, HTTP-escaping was suggested. This is no longer valid. "

So try replacing the space with rs040

Revision history for this message
Assem (bayahiassem) said :
#2

Thanks for the answer but I tried that and it didn't work; I got the same error.

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#3

Try replacing the space with \040 instead

If \040 does not work either, then I think your pc is experiencing this bug:

https://bugs.launchpad.net/debian/+source/bash-completion/+bug/219971

Revision history for this message
Assem (bayahiassem) said :
#4

well rs040 didn't work , and when I run the mount, the url I get still contain "rs040" but when I use "\040" I got an error saing that the url format is not valid.

Revision history for this message
Best Mark Rijckenberg (markrijckenberg) said :
#5

As a workaround solution, is it not possible to replace the line

http://happy.test.com/rest/Organisation interne /home/me/mnt/OrgInterne davfs noauto,user,uid=1000,gid=1000,no_netdev 0 0

with the line

http://happy.test.com/rest /home/me/mnt/OrgInterne davfs noauto,user,uid=1000,gid=1000,no_netdev 0 0

in your /etc/fstab file?

If that does not work either, I cannot help you any further.

Revision history for this message
Assem (bayahiassem) said :
#6

The workaround works fine, thanks Mark.

Revision history for this message
Assem (bayahiassem) said :
#7

Thanks Mark Rijckenberg, that solved my question.