Nautilus get error when I try to open webdav directories

Bug #227852 reported by Tomek Jadczuk
20
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs
Nominated for Hardy by johe

Bug Description

Binary package hint: nautilus

I have resources on webdav server (apache). When I try open directories in webdav share I get info:
Błąd: Błąd HTTP: Moved Permanently
Proszę wybrać inną przeglądarkę i spróbować ponownie.

In nautilus in ubuntu 7.10 it's work perfect.

ProblemType: Bug
Architecture: i386
Date: Wed May 7 18:35:31 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/nautilus
NonfreeKernelModules: nvidia
Package: nautilus 1:2.22.2-0ubuntu4
PackageArchitecture: i386
ProcEnviron:
 PATH=/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=pl_PL.UTF-8
 SHELL=/bin/bash
SourcePackage: nautilus
Uname: Linux 2.6.24-16-generic i686

UPDATE:

Connecting to webDAV locations (davs or dav) without a username works fine. However, put the username in the URL, and it breaks. This is because the username isn't stripped after you enter in the password, causing gvfs/nautilus to connect to <username>@server.com instead of server.com. This problem is not seen with SFTP links.

Tags: apport-bug
Revision history for this message
Tomek Jadczuk (mishek) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your bug report. could you use an english local to get the error descriptions? does the gvfs-ls, etc command work correctly?

Changed in nautilus:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Tomek Jadczuk (mishek) wrote : Re: [Bug 227852] Re: Nautilus get error when I try to open webdav directories

Dnia 10-05-2008, So o godzinie 20:45 +0000, Sebastien Bacher pisze:
> thank you for your bug report. could you use an english local to get the
> error descriptions? does the gvfs-ls, etc command work correctly?
>
> ** Changed in: nautilus (Ubuntu)
> Importance: Undecided => Low
> Assignee: (unassigned) => Ubuntu Desktop Bugs (desktop-bugs)
> Status: New => Incomplete
>

Hello

I discover that I get this error, only when I use connection made by
creator: "Connect with server" -> WebDAV (HTTP).
When I put server's address in "Location" bar, connection works OK.
For me right now looks like bad working connection creator.
Tomorrow I will get error with English locals, and i check gvfs-ls.

--
Tomasz Jadczuk
<email address hidden>

Revision history for this message
Tomek Jadczuk (mishek) wrote :

Dnia 2008-05-10, sob o godzinie 20:45 +0000, Sebastien Bacher pisze:
> thank you for your bug report. could you use an english local to get the
> error descriptions? does the gvfs-ls, etc command work correctly?
>
> ** Changed in: nautilus (Ubuntu)
> Importance: Undecided => Low
> Assignee: (unassigned) => Ubuntu Desktop Bugs (desktop-bugs)
> Status: New => Incomplete
>
Hello

I think this may be helpful:
address:
dav://<email address hidden>/shared_dir/
gives error in connection

addres:
dav://addres.of.dav.server/shared_dir/
works fine.

This is my webdav server config:

<VirtualHost *:*>
        ServerName dav.test.local
        DocumentRoot /var/webdav/

 CustomLog /var/log/apache2/dav-access.log combined
   ErrorLog /var/log/apache2/dav-error.log

 DavLockDB /usr/share/apache2/var/DavLock

 <Location />
        Dav On
        AuthName "WebDAV Login"
        AuthType Basic
        AuthUserFile /etc/apache2/passwd
 ## Limit access for enhanced security
 <LimitExcept GET HEAD OPTIONS POST>
                Require valid-user
 </LimitExcept>
        Order allow,deny
        Allow from all
 </Location>

</VirtualHost>

apache server is from default ubuntu instalation.

Revision history for this message
Sebastien Bacher (seb128) wrote :

do you still get the issue using the current version? where do you write the username in the connect to server dialog? does gvfs-mount work correctly?

Revision history for this message
Tomek Jadczuk (mishek) wrote :

Dnia 2008-06-25, śro o godzinie 13:58 +0000, Sebastien Bacher pisze:
I will check this.
> do you still get the issue using the current version? where do you write
> the username in the connect to server dialog? does gvfs-mount work
> correctly?
>

Revision history for this message
Tomek Jadczuk (mishek) wrote : Re: [Bug 227852] Re: Nautilus get error when I try to open webdav directories

if I use adres like that:
dav://<email address hidden>:32102/
I steal can't get acces to folders on dav server
adres like that:
dav://dav.test.local:32102/
work OK for me

I can't use creator to get work dav shares

2008/6/25 Sebastien Bacher <email address hidden>:
> do you still get the issue using the current version? where do you write
> the username in the connect to server dialog? does gvfs-mount work
> correctly?
>
> --
> Nautilus get error when I try to open webdav directories
> https://bugs.launchpad.net/bugs/227852
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Tomek Jadczuk
<email address hidden>

Revision history for this message
Sebastien Bacher (seb128) wrote :

why do you need to specify the username in the url, you should get a password dialog letting you enter login and password informations when you try to connect to the server?

Revision history for this message
Tomek Jadczuk (mishek) wrote : Re: [Bug 227852] Re: Nautilus get error when I try to open webdav directories

Dnia 2008-06-26, czw o godzinie 08:04 +0000, Sebastien Bacher pisze:
> why do you need to specify the username in the url, you should get a
> password dialog letting you enter login and password informations when
> you try to connect to the server?
>
> ** Changed in: gvfs (Ubuntu)
> Sourcepackagename: nautilus => gvfs
>

I use seahorse to authorise session.
I think it's problem with ulr, that nautilus send to webdav server,
that's why server give 301 error.

Regards
T.J.

Revision history for this message
Phr00t (phr00t) wrote :

I get this same problem.

Basically, the username is not being stripped from the connection URL after you type in the password.

I want to include the username in the URL so I just need to enter my password on connecting to a webDAV share. The login prompt correctly notices the username, and asks for just the password. However, when nautilus/gvfs tries to connect the the server, it fails because it is trying to connect to:

"<username>@server.com" with <username>/<password>

Instead of

"server.com" with <username>/<password>

sftp and other protocols are handled correctly in this manner...

- Phr00t

Changed in gvfs:
status: Incomplete → Confirmed
Phr00t (phr00t)
description: updated
Revision history for this message
Peter Adolphs (futzilogik) wrote :

Sebastien Bacher wrote:
> why do you need to specify the username in the url, you should get a password
> dialog letting you enter login and password informations when you try to connect
> to the server?

The URL with the username specified is the outcome of a standard Gnome dialog: the "Connect to Server" dialog for WebDAV has an optional username textfield, and its value is canned into the final URL. If the username is part of the URL, then you'll get a password dialog without the username textfield and finally a "HTTP Error: Moved Permanently" error.

Revision history for this message
Christian Kellner (gicmo) wrote :

Ok, I am not sure I get this. What the WebDAV code does is the following:

We parse the URI and every part of it and then prefill the authentication information with that. So a URI of dav://<email address hidden>/path should result in username being "user" and the host "server.tld" ...
If your username has an @ sign in it (i.e. it is an E-Mail address) you need to URL escape the @ sign by using %40 otherwise you will end up with an url parsing error or something.
Encoding the password is not supported right now. So you should always get a password dialog box, prefilled with the correct username if specified.

Revision history for this message
Peter Adolphs (futzilogik) wrote :

@Christian Kellner:

Did you test this?

I do get different authentification dialogs when I use an URI with or without a username (without @ in the username itself). If I don't provide a username, I get the password dialog with a username textfield. Then I enter my username and password and everything is fine. If the URI has a username encoded, there is just a password dialog without the username textfield. This always leads to "HTTP Error: Moved Permanently" error.

I use Ubuntu 8.04.1 with all updates, Nautilus 2.22.3

Revision history for this message
nh2 (nh2) wrote :

As we found out in Bug 222532, this is still happening in Intrepid.

It ONLY happens when connection to a sub-directory.

Please try to connect to the WebDAV webdavtest.nh2.me and also to webdavtest.nh2.me/webdavtest via dialog or dav:// link. Both are mapped to the same directory, but only the first one will work, the other one will throw the "Moved Permanently" error.

Revision history for this message
Sebastien Bacher (seb128) wrote :

is that still an issue in jaunty? could you open a bug on bugzilla.gnome.org?

Revision history for this message
Tomek Jadczuk (mishek) wrote : Re: [Bug 227852] Re: Nautilus get error when I try to open webdav directories

Dnia 2009-04-22, śro o godzinie 21:15 +0000, Sebastien Bacher pisze:
> is that still an issue in jaunty? could you open a bug on
> bugzilla.gnome.org?
>

I check this. In jaunty is OK. Thank You for remember.

--
Tomek Jadczuk <email address hidden>

Revision history for this message
Sebastien Bacher (seb128) wrote :

closing since that works on jaunty

Changed in gvfs (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
johe (johe-stephan) wrote :

This bug is not fixed in Hardy (8.04 LTS)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.