Skip to content

Fix for servers responding partial URLs

Some Send server responds with a URL without scheme. Therefore, Url::parse(&self.url) fails. This PR adds a fallback for this case.

Fixes https://github.com/timvisee/ffsend/issues/159

Remarks: If you want to mimic a server like this, you can insert the following codes before this line.

https://github.com/YDX-2147483647/ffsend-api/blob/35ec2f80f98e190e22cc687b75fde8d3c99ff48d/src/action/upload.rs#L357

        let upload_response = UploadResponse {
            url: upload_response
                .url
                .strip_prefix("https://")
                .unwrap()
                .to_string(),
            id: upload_response.id,
            owner_token: upload_response.owner_token,
        };

I notice that you might prefer GitLab, so I make a copy from https://github.com/timvisee/ffsend-api/pull/81.

Merge request reports

Loading