Re: [PATCH 4/5] bundle-uri: add support for http(s):// and file://
- From
Derrick Stolee <derrickstolee@github.com>
- Date
- Aug 1, 2022, 14:00 UTC
- Message-ID
- <6621a20d-9857-2150-258f-f229cea525dd@github.com>
- In-Reply-To
- <YuG3miyCKtnv3Na/@google.com>
On 7/27/2022 6:09 PM, Josh Steadmon wrote:
> On 2022.07.25 20:34, Derrick Stolee via GitGitGadget wrote:
Show 10 quoted lines
>> +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