RE: [PHP-DEV] Download mirrors lagging behind
| From: | Dejan Markic | Date: | Sat, 24 Nov 2012 20:40:00 +0000 |
| Subject: | RE: [PHP-DEV] Download mirrors lagging behind | ||
| References: | 1 2 3 4 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-39642@lists.php.net to get a copy of this message | ||
Hello!
Indeed it works like this:
wget "http://php.net/get/php-5.4.9.tar.gz/from/this/mirror"
--2012-11-24 21:36:28-- http://php.net/get/php-5.4.9.tar.gz/from/this/mirror
Resolving php.net... 69.147.83.199
Connecting to php.net|69.147.83.199|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://si1.php.net/get/php-5.4.9.tar.gz/from/this/mirror
[following]
--2012-11-24 21:36:32-- http://si1.php.net/get/php-5.4.9.tar.gz/from/this/mirror
Resolving si1.php.net... 193.9.21.50
Connecting to si1.php.net|193.9.21.50|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://si1.php.net/distributions/php-5.4.9.tar.gz
[following]
--2012-11-24 21:36:32-- http://si1.php.net/distributions/php-5.4.9.tar.gz
Connecting to si1.php.net|193.9.21.50|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14051680 (13M) [application/x-gzip]
And request for file that does not exists also produces 404 error:
wget "http://si1.php.net/get/php-5.4.10.tar.gz/from/this/mirror"
--2012-11-24 21:36:58-- http://si1.php.net/get/php-5.4.10.tar.gz/from/this/mirror
Resolving si1.php.net... 193.9.21.50
Connecting to si1.php.net|193.9.21.50|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2012-11-24 21:36:58 ERROR 404: Not Found.
I've also added (hopefuly) the correct php mirrors mailing address so this conversation will
properly be forwarded also to PHP Mirrors mailing list.
Kind regards,
Dejan Markic
-----Original Message-----
From: Hannes Magnusson [mailto:hannes.magnusson@gmail.com]
Sent: Saturday, November 24, 2012 9:26 PM
To: Bostjan Skufca
Cc: mirror@php.net; Dejan Markic
Subject: Re: [PHP-DEV] Download mirrors lagging behind
On Fri, Nov 23, 2012 at 2:07 PM, Bostjan Skufca <bostjan@a2o.si> wrote:
>
> On 23 November 2012 18:27, Hannes Magnusson
> <hannes.magnusson@gmail.com>
> wrote:
>>
>> On Fri, Nov 23, 2012 at 5:40 AM, Bostjan Skufca <bostjan@a2o.si> wrote:
>
>> > 2. Also, when release it not found on the mirror, 200 OK is
>> > returned, leading installation software to think that archive was
>> > downloaded sucessfully (fails with md5 or gunzip later on though).
>>
>>
>> If you open up the file you'll see this is the mirror selection page.
>> You can pick which mirror you want to download from.
>
>
> These give quite different output:
> http://si1.php.net/get/php-5.4.9.tar.gz/from/a/mirror
> http://uk.php.net/get/php-5.4.9.tar.gz/from/a/mirror
> (the later displays mirror selection page, the former do not)
What did the first one return?
Since the mirror didn't have the file at the time, I believe it may have given you back
"this file doesn't exists on this mirror" page?
>> We haven't changed this for years so this method of fetching
>> "/from/a/mirror" has never resulted in getting the actual archive..
>> You need to "/from/*this*/mirror" or "/from/[XXX].php.net/mirror"
>
>
> Ok, I see.
>
> Is there any generic URI that will forward to the closest mirror
> automatically, based on client's IP? Something I can use on servers
> all over the world that will give me the (presumably) fastest
> download, based on my geolocation and actual mirror list?
$ wget http://php.net/get/php-5.4.9.tar.gz/from/this/mirror
The www mirror should refuse to serve this request and redirect you to the nearest mirror based on
your ip and download the file from that one.
-Hannes