Re: [PATCH 4/5] bundle-uri: add support for http(s):// and file://
From: Derrick Stolee <hidden>
Date: 2022-08-01 14:00:43
From: Derrick Stolee <hidden>
Date: 2022-08-01 14:00:43
On 7/27/2022 6:09 PM, Josh Steadmon wrote:
On 2022.07.25 20:34, Derrick Stolee via GitGitGadget wrote:
quoted
+static int copy_uri_to_file(const char *filename, const char *uri) +{ + const char *out; + + if (skip_prefix(uri, "https:", &out) || + skip_prefix(uri, "http:", &out)) + return download_https_uri_to_file(filename, uri);Since we're not using "out" here, should we replace the skip_prefix()s with starts_with(), or perhaps even istarts_with()?
Sounds good to me. Can't abandon "out" because it is used for the "file://" prefix, but istarts_with() is better here. Thanks, -Stolee