Bug 243299 - fetch(1) fails to handle redirects on a valid URL
Summary: fetch(1) fails to handle redirects on a valid URL
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-12 19:42 UTC by Yuri Victorovich
Modified: 2020-01-13 13:43 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2020-01-12 19:42:01 UTC
> $ fetch "https://www.tddft.org/programs/libxc/down.php?file=4.3.4/libxc-4.3.4.tar.gz"
> fetch: https://www.tddft.org/programs/libxc/down.php?file=4.3.4/libxc-4.3.4.tar.gz: No address record


But wget succeeds:
> $ wget "https://www.tddft.org/programs/libxc/down.php?file=4.3.4/libxc-4.3.4.tar.gz"
> --2020-01-12 11:40:57--  https://www.tddft.org/programs/libxc/down.php?file=4.3.4/libxc-4.3.4.tar.gz
> Resolving www.tddft.org (www.tddft.org)... 193.137.208.200
> Connecting to www.tddft.org (www.tddft.org)|193.137.208.200|:443... connected.
> HTTP request sent, awaiting response... 302 Found
> Location: down/4.3.4/libxc-4.3.4.tar.gz [following]
> --2020-01-12 11:40:59--  https://www.tddft.org/programs/libxc/down/4.3.4/libxc-4.3.4.tar.gz
> Reusing existing connection to www.tddft.org:443.
> HTTP request sent, awaiting response... 200 OK
> Length: 15602575 (15M) [application/x-gzip]
> Saving to: ‘down.php?file=4.3.4%2Flibxc-4.3.4.tar.gz.4’
>
> down.php?file=4.3.4%2Flibxc-4.3.4.tar.gz.4    1%[>                                                                                        ] 279.68K   187KB/s               ^