DNS breaks contract

I have discovered that DNS resolution within a Docker container is done in a case-sensitive manner. This presents a serious problem since it breaks the standard contract that DNS names are case-insensitive.

as an example, I’m running a container named Test. the two queries below perform differently when they should produce identical output:

# curl http://Test/
  "status" : "ok"

# curl http://test/
curl: (6) Could not resolve host: test

at this level the problem is not so bad but applications that rely on functions within the http stack that parse the urls before making a request are all going to break since the parsing function returns a hostname in lowercase. so even when the developer provides the correct case, the lowercasing by the internals of the http stack will break resolution

and I’m guessing a lot of software is going to break as a result of this. I just spent half a day figuring this out and I’ve had to abandon the node-fetch module and rewrite everything using http requests (where I can avoid the url parsing). ouch