Giter Site home page Giter Site logo

Comments (2)

Hinaser avatar Hinaser commented on July 28, 2024

I read lines of source code and found out that detailed information for redirection is included in http response header.
The information contains distance between client computer and redirecting computer calculated by longitude/latitude which also calculated by IP address for each computers.

The response header that describes wrong behavior from http://httpredir.debian.org/demo is as follows:

HTTP/1.1 200 OK
Date: Mon, 03 Oct 2016 05:15:48 GMT
Server: Apache
Cache-Control: no-cache
Pragma: no-cache
Link: <http://giano.com.dist.unige.it/debian/>; rel=duplicate; pri=13948; depth=0, <http://ftp.cz.debian.org/debian/>; rel=duplicate; pri=13968; depth=0, <http://debian.ethz.ch/debian/>; rel=duplicate; pri=14283; depth=0
X-AS: 4713
X-City: Setagaya
X-Closest-Distance: 139.4834
X-Continent: AS
X-Country: JP
X-Distance: 142.8334
X-IP: 61.126.xxx.xxx
X-Match-Type: nearby-continent
X-Population: 8
X-Region: 40
X-Std-Dev: 4.58363229328008
X-Clacks-Overhead: GNU Terry Pratchett
Transfer-Encoding: chunked
Connection: Keep-Alive

When requested the demo page again after tens of minutes, I got correct response from the server as follows:

HTTP/1.1 200 OK
Date: Mon, 03 Oct 2016 05:45:34 GMT
Server: Apache
Cache-Control: no-cache
Pragma: no-cache
Link: <http://debian-mirror.sakura.ne.jp/debian/>; rel=duplicate; pri=10; depth=0
X-AS: 4713
X-City: Setagaya
X-Closest-Distance: 0.0966999999999913
X-Continent: AS
X-Country: JP
X-Distance: 0.0966999999999913
X-IP: 61.126.xxx.xxx
X-Match-Type: country
X-Population: 1
X-Region: 40
X-Std-Dev: 0
X-Clacks-Overhead: GNU Terry Pratchett
Transfer-Encoding: chunked
Connection: Keep-Alive

Comparing X-Closest-Distance in correct/incorrect response header shows the difference.

from http-redirector.

Hinaser avatar Hinaser commented on July 28, 2024

Maybe I've found out root cause of this issue.

There are 2 servers representing httpredir.debian.org .

appuser@debian-8:~$ nslookup httpredir.debian.org
Server:         10.0.2.3
Address:        10.0.2.3#53

Non-authoritative answer:
Name:   httpredir.debian.org
Address: 128.31.0.66
Name:   httpredir.debian.org
Address: 5.153.231.35

For the server whose ip is 5.153.231.35 always returns correct mirrors while the server of 128.31.0.66 always return incorrect mirrors.

I looked up those IP addresses in GeoIP and found that the server of 128.31.0.66 is managed by MIT.

IP Country Location Organization Domain
128.31.0.66 US Cambridge, North America Massachusetts Institute of Technology mit.edu
5.153.231.35 GB Great Britain, Europe Bytemark Limited debian.org

So I need to tell to the right persons that ./update.sh && ./build-main-db.pl should be run to update database of mirrors to the latest version.

from http-redirector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.