Skip to content

Add support for temporary redirects 302 #732

@gkivanov

Description

@gkivanov

Expected behaviour

Temporary redirects 302 are supported and not treated as permanent redirects.

Actual behaviour

Temporary redirects 302 are not supported. The app treats 302 as a permanent redirect and uses the last url (after redirects) as authoritative. However, as the redirect is temporary the last url may not be available in the future.

NCManageDatabase::getDirectoryId is always called with the URL after redirects without considering whether they are temporary or permanent.

Steps to reproduce

  1. Run nextcloud on port 8081
  2. Setup server to listen on port 8082 and send a redirect code 301 to same url but on port 8081.
  3. Try to login in through desktop app with port 8082.
  4. All fine, files are able to download, upload, etc.
  5. Kill app
  6. Remove redirection from server
  7. Move nextcloud to listen on port 8082
  8. Run app again
  9. It fails to download any file

iOS version

iOS 12.1

App version

Testflight version 2.22.6 (17)

Server configuration

Operating system:

Debian Linux

Web server:

Apache

Database:

default

PHP version:

default from snap

Nextcloud version: (see Nextcloud admin page)

13.0.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions