wiki:MisbehavingServers

Version 2 (modified by jmroot (Joshua Root), 11 years ago) (diff)

--

Checksum mismatches due to misbehaving DNS or web servers

You were probably directed to this page due to a checksum mismatch where the downloaded distfile appeared to contain HTML. There a a few reasons this can happen:

  • Your ISP's DNS servers redirect lookups of nonexistent host names to a search page. Some ISPs have decided that instead of returning the correct error code when a hostname does not exist, they will pretend that it does and say that its IP address is one that actually belongs to a web server they run. The idea is to be convenient for users, since it gives them a search page when they try to visit a nonexistent site in a browser. However, as well as violating the relevant Internet standards, this behaviour breaks many programs (such as MaPorts) that need to know whether a hostname exists or not.

Ask your ISP to correct the behaviour of their servers. Until they do, you will probably need to use different DNS servers. Information about using a number of public DNS services is readily available on the web.

Of course, having mirrors that no longer exist listed in a portfile is not useful (even if it doesn't cause problems when using working DNS servers), so the maintainer should remove them.

  • You are behind a proxy that is denying access to the download site. Many proxies serve an HTML error page in this case, and some do not use the correct HTTP response code. Ask your network administrator to allow access to the relevant site, and to configure the proxy to use the correct response code when serving error pages.
  • The download site no longer has the file, and does not indicate this with the correct response code. Usually such mirrors should be removed from portfiles, so feel free to ask the maintainer to do so. You could also ask the owner of the mirror to fix their server configuration.