After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676582 - GVFS fails to connect to cpdavd via WebDAV
GVFS fails to connect to cpdavd via WebDAV
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: webdav backend
1.12.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2012-05-22 17:43 UTC by Dmitry Kopytov
Modified: 2013-12-09 06:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Full tcpdump output (6.67 KB, text/plain)
2012-05-22 17:43 UTC, Dmitry Kopytov
Details

Description Dmitry Kopytov 2012-05-22 17:43:58 UTC
Created attachment 214679 [details]
Full tcpdump output

Cpdavd is a WebDAV daemon in very popular hosting solution WHM/cPanel. It is not possible to connect to it via GVFS.

GVFS sends two requests to the WebDAV service: the first - without credentials, the second - with credentials. When it sends the first request, cpdavd sends the response "Authorization Required" and closes the connection. After that GVFS sends the second request via the closed connection and server sends a TCP-packet with RST flag as a response. As a result GVFS generates an error "Not a WebDAV enabled share".

I think GVFS must check the connection before it sends the second request and reinitialize the connection if it has been closed by server.

To reproduce the problem just try to open address "dav://cpanel1.fozzy.com:2077" in Nautilus with any username and password.

You can see full tcpdump output in the attachment.
Comment 1 Ross Lagerwall 2013-12-09 06:19:35 UTC
If anything, this sounds more like a libsoup error.

Anyway, it seems to have been fixed (although the error message could do with some improvement perhaps). Notice how the server replies at the end with a 403 forbidden message which indicates that it is communicating successfully with the server. Tested with gvfs from git and libsoup from git.

Output from the command-line client:
gvfs-mount dav://cpanel1.fozzy.com:2077
Enter password for cPanel WebDisk
User: testuser
Password: 
Error mounting location: Not a WebDAV enabled share

Output from gvfs:
Added new job source 0x10c0330 (GVfsBackendDav)
Queued new job 0x10d8b70 (GVfsJobMount)
+ mount
> OPTIONS / HTTP/1.1
> Soup-Debug-Timestamp: 1386569665
> Soup-Debug: SoupSessionSync 1 (0x10dc100), SoupMessage 1 (0x7fe1200050d0), SoupSocket 1 (0x7fe12000a8a0)
> Host: cpanel1.fozzy.com:2077
> Apply-To-Redirect-Ref: T
> Accept-Encoding: gzip, deflate
> User-Agent: gvfs/1.19.3
> Accept-Language: en-za, en;q=0.9, en-us;q=0.8, en;q=0.7, en;q=0.6
> Connection: Keep-Alive
  
< HTTP/1.1 200 OK
< Soup-Debug-Timestamp: 1386569665
< Soup-Debug: SoupMessage 1 (0x7fe1200050d0)
< Date: Mon, 09 Dec 2013 06:14:05 GMT
< Server: cPanel
< Persistent-Auth: false
< Host: cpanel1.fozzy.com:2077
< Cache-Control: no-cache
< Connection: Keep-Alive
< Vary: Accept-Encoding
< Allow: UNLOCK, HEAD, PROPPATCH, MOVE, OPTIONS, LOCK, POST, PUT, COPY, MKCOL, GET, DELETE, PROPFIND
< Content-Length: 0
< Content-Type: text/plain
< Expires: Fri, 01 Jan 1990 00:00:00 GMT
< DAV: 1, 2
< Keep-Alive: timeout=15, max=96
< MS-Author-Via: DAV
< 
  
> PROPFIND / HTTP/1.1
> Soup-Debug-Timestamp: 1386569665
> Soup-Debug: SoupSessionSync 1 (0x10dc100), SoupMessage 2 (0x7fe1200051c0), SoupSocket 1 (0x7fe12000a8a0)
> Host: cpanel1.fozzy.com:2077
> Depth: 0
> Content-Type: application/xml
> Accept-Encoding: gzip, deflate
> User-Agent: gvfs/1.19.3
> Accept-Language: en-za, en;q=0.9, en-us;q=0.8, en;q=0.7, en;q=0.6
> Connection: Keep-Alive
> 
> <?xml version="1.0" encoding="utf-8" ?>
>  <D:propfind xmlns:D="DAV:">
>   <D:prop>
> <D:resourcetype/>
>   </D:prop>
>  </D:propfind>
  
+ soup_authenticate_interactive (first auth) 
- soup_authenticate 
< HTTP/1.1 401 Unauthorized
< Soup-Debug-Timestamp: 1386569669
< Soup-Debug: SoupMessage 2 (0x7fe1200051c0)
< Date: Mon, 09 Dec 2013 06:14:05 GMT
< Server: cPanel
< Persistent-Auth: false
< Host: cpanel1.fozzy.com:2077
< Cache-Control: no-cache
< Connection: Keep-Alive
< Vary: Accept-Encoding
< WWW-Authenticate: Basic realm="cPanel WebDisk"
< Content-Encoding: gzip
< Content-Length: 52
< Content-Type: text/html; charset="utf-8"
< Expires: Fri, 01 Jan 1990 00:00:00 GMT
< 
< <html>Authorization Required</html>
  
> PROPFIND / HTTP/1.1
> Soup-Debug-Timestamp: 1386569669
> Soup-Debug: SoupSessionSync 1 (0x10dc100), SoupMessage 2 (0x7fe1200051c0), SoupSocket 1 (0x7fe12000a8a0), restarted
> Host: cpanel1.fozzy.com:2077
> Depth: 0
> Content-Type: application/xml
> Accept-Encoding: gzip, deflate
> Accept-Language: en-za, en;q=0.9, en-us;q=0.8, en;q=0.7, en;q=0.6
> Connection: Keep-Alive
> Content-Length: 124
> User-Agent: gvfs/1.19.3
> Authorization: Basic [testuser:*********]
> 
> <?xml version="1.0" encoding="utf-8" ?>
>  <D:propfind xmlns:D="DAV:">
>   <D:prop>
> <D:resourcetype/>
>   </D:prop>
>  </D:propfind>
  
> PROPFIND / HTTP/1.1
> Soup-Debug-Timestamp: 1386569669
> Soup-Debug: SoupSessionSync 1 (0x10dc100), SoupMessage 2 (0x7fe1200051c0), SoupSocket 2 (0x7fe12000a960), restarted
> Host: cpanel1.fozzy.com:2077
> Depth: 0
> Content-Type: application/xml
> Accept-Encoding: gzip, deflate
> Accept-Language: en-za, en;q=0.9, en-us;q=0.8, en;q=0.7, en;q=0.6
> Connection: Keep-Alive
> Content-Length: 124
> User-Agent: gvfs/1.19.3
> Authorization: Basic [testuser:*********]
> 
> <?xml version="1.0" encoding="utf-8" ?>
>  <D:propfind xmlns:D="DAV:">
>   <D:prop>
> <D:resourcetype/>
>   </D:prop>
>  </D:propfind>
  
< HTTP/1.1 403 Error
< Soup-Debug-Timestamp: 1386569670
< Soup-Debug: SoupMessage 2 (0x7fe1200051c0)
< Date: Mon, 09 Dec 2013 06:14:09 GMT
< Server: cPanel
< Content-Length: 9
< 
< Forbidden
  
 [/] webdav: 1, collection 0 [res: 0]
send_reply, failed: 1

** (lt-gvfsd:5947): WARNING **: dbus_mount_reply: Error from org.gtk.vfs.Mountable.mount(): Not a WebDAV enabled share