Skip to content

The "AbstractClientTestCase" is missing download testing #233

@aik099

Description

@aik099

The "AbstractClientTestCase" class doesn't have a test that verifies downloading over http/https protocol.

The #232 and #234 are the direct cause of this.

Plan

  1. create an URL (e.g. download_attachment.php near the debug_response.php), that once accessed, will return:
    • 303 See Other HTTP code
    • a Location header with a URL (on the same server) where actual downloadable file is located
  2. then will use ClientInterface::sendRequest method to access that page and check what's returned
  3. if the contents matches the to-be-downloaded file, then test passes
  4. initially test should fail for CurlClient, because it doesn't follow location by default
HTTP/1.1 303 See Other
Location: https://www.example.com/other-resource
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Date: Tue, 09 Jan 2025 10:00:00 GMT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions