Ignore MisbehavingServers rather than fail with an error

Ryan Schmidt ryandesign at macports.org
Wed Apr 11 16:52:26 PDT 2012


On Apr 11, 2012, at 18:32, Daniel J. Luke wrote:

> On Apr 11, 2012, at 6:57 PM, Ryan Schmidt wrote:
>>>> I agree it and a bit of a hack, but I cannot envision a situation in which it doesn't work correctly. If you can, please let me know.
>>> 
>>> The obvious failure case would be a correctly downloaded file that looks
>>> like HTML to file(1) but doesn't end in .htm[l].
>> 
>> Right, and I don't think any such file exists, at least not used as a MacPorts distfile.
> 
> note that gzip/bzip/tar/cpio file test appear earlier in /usr/share/file/magic than the tests for html files

So you're saying if a file is a gzip/bzip/tar/cpio file, "file" will identify it as such, and not as an html file? That's exactly how I would expect it to work...


>> To try to avoid these sloppy DNS servers I usually have Google's DNS servers 8.8.8.8 and 8.8.4.4 in my laptop's DNS settings. But I have encountered networks before where I was unable to get to certain sites, and had to remove these DNS settings and use the network's DNS servers instead.
> 
> not to mention networks where using an alternate DNS server isn't allowed by policy (and/or filtering). I don't think it's unreasonable to use a 'known good' server for a test of some sort, but would disagree with overriding local configuration.

Right. Consider also the case of an organization wanting to offer a local private MacPorts distfiles mirror, for speed and to reduce their public bandwidth. They might do that by overriding the DNS result for distfiles.macports.org, redirecting it to a local caching proxy server. Making MacPorts always use a known-good DNS server would defeat that.


>> The whole idea of many users globally using the same DNS servers -- Google DNS, OpenDNS, etc. -- is contrary to how DNS was intended to be used in the first place. But companies like these seem to be rewriting the book on DNS and making it work.
> 
> meh. anycasted instances of "global" dns servers like Google/OpenDNS provides are often better/closer/faster than the ones provided by an individual's ISP.

Indeed; I guess I'm mostly bemused that the original architecture of DNS has been turned on its head like this, and that it works so well.



More information about the macports-dev mailing list