Bug #69292 [Opn]: Download links are not wget compatible
| From: | cmb@php.net | Date: | Tue, 24 Mar 2015 23:29:31 +0000 |
| Subject: | Bug #69292 [Opn]: Download links are not wget compatible | ||
| References: | 1 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-20957@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69292&edit=1
ID: 69292
Updated by: cmb@php.net
Reported by: scott at perturb dot org
Summary: Download links are not wget compatible
Status: Open
Type: Bug
Package: Website problem
Operating System: All
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
In my opinion that is not a bug, but rather something that might be
improved, if at all -- what's wrong with something like:
FILE=php-5.3.29.tar.bz2;\
wget http://br1.php.net/get/$FILE/from/this/mirror;\
mv mirror $FILE
Previous Comments:
------------------------------------------------------------------------
[2015-03-24 20:33:53] scott at perturb dot org
Description:
------------
I download the PHP release .tar.bz2 files from the php.net all the time to do testing. 99% of the
time I navigate to the download page on my local machine, and copy and paste the URL in to a
terminal on the server I want to compile on. The download URLs look like this: http://br1.php.net/get/php-5.3.29.tar.bz2/from/this/mirror
which I then feed to wget:
$ wget http://br1.php.net/get/php-5.3.29.tar.bz2/from/this/mirror
--2015-03-24 08:58:06-- http://br1.php.net/get/php-5.3.29.tar.bz2/from/this/mirror
Resolving br1.php.net (br1.php.net)... 187.73.33.52
** [snipped] **
HTTP request sent, awaiting response... 200 OK
Length: 11396771 (11M) [application/octet-stream]
Saving to: âmirrorâ
mirror 100%[========================>] 10.87M 1.22MB/s in 11s
2015-03-24 08:58:17 (1006 KB/s) - âmirrorâ saved [11396771/11396771]
Note that the file that gets written to disk is "mirror" and not php-5.3.29.tar.bz2.
It's a minor annoyance, but it seems really easily fixed.
Test script:
---------------
N/A
Expected result:
----------------
When I wget a URL from a server, it should have the right file name.
Actual result:
--------------
Wget uses the part of the URL after the last "/" as the output filename. Arguably this is
a bug in Wget, but it's also something we can easily work around on the php-web side.
Someone already thought of this, because there is mention of wget style download links in the code:
https://github.com/php/web-php/blob/master/error.php#L136
If we remap the filename in the download URL to be at the END, it should solve this problem.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69292&edit=1