bugdavfs2 - Bugs: bug #65376, Double-redirects not supported

 
 

bug #65376: Double-redirects not supported

Submitter:  John Wodder <jwodder>
Submitted:  Tue 27 Feb 2024 02:19:05 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 27 Feb 2024 02:19:05 PM UTC, original submission:  

It appears that, when GETing a non-collection resource, davfs2 does not support redirect responses that redirect to another redirect.

Specifically, I am using davfs2 against the following setup:

- Server 1 (the one davfs2 connects to) is a WebDAV server that provides a WebDAV view of resources on Server 2.

- When Server 1 receives a GET request for a non-collection resource, it responds with a 307 redirect.  For some resources, this redirect goes straight to Server 2 (which responds with the data normally), while for other resources (for reasons I won't go into) it responds with a 307 redirect to Server 3, which responds with a 302 redirect to Server 2.

- When Server 1 is mounted with davfs2 (with `follow_redirect 1` set), accessing files that Server 1 redirects straight to Server 2 works fine, but an I/O error occurs if I attempt to access a file that Server 1 redirects to Server 3.

- Neither Server 2 nor Server 3 supports WebDAV.

- None of the servers require authentication.

- Accessing both kinds of files on Server 1 (including following all redirects) via curl or a web browser works fine, so this appears to be specific to davfs2.

Attached are two excerpts from `/var/log/daemon.log` taken while `debug most` was in effect.  `success.log` shows a successful access of a file that Server 1 redirects directly to Server 2, while `failure.log` shows a failed access of a file redirected to Server 3.  Note that, in `failure.log`, the HTTP requests stop after receiving the 302 response from Server 3, and davfs2 immediately declares an error.

davsf2 version: 1.7.0 
OS: Debian GNU/Linux 11 (bullseye)

John Wodder <jwodder>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #55757:  success.log added by jwodder (6KiB - application/octet-stream)
file #55758:  failure.log added by jwodder (9KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwodder (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-27 jwodder Attached File- Added success.log, #55757
        Attached File- Added failure.log, #55758

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code