Closed eaglegai closed 6 months ago
So hostnames are case-insensitive, so if changing the case of the name breaks things then that is a bug in the resolver on your system. It might also be a configuration setting...
dns is case-insensitive, but getaddrinfo which is provided by glibc(my version is 2.38) is case-sensitive, maybe in tests, httpAddrGetList shouldn't use the hostname given by httpGetHostname. Next, I will lookup glibc code.
Yeah, that doesn't make any sense for glibc to treat hostnames as case-sensitive.
It does not sound as CUPS bug for me either, so I'll close the issue for now. @eaglegai in case you find out the cause is really in CUPS, do let us know.
Thank you for reporting the issue nevertheless!
Describe the bug since https://github.com/OpenPrinting/cups/commit/bd31658d04ed320fd6e8b2896f6997c37fbb3ee0, it will make hostname from uppercase to lowercase. cups version: 2.4.7
for example, my hostname is "WebTest", in testcase httpGetHostname, host->h_name is "WebTest", after _cups_tolower, httpGetHostname return "webtest" as hostname. then in the next testcase httpAddrGetList(testhttp.c)
httpAddrGetList use "webtest" as the first argument, then getaddrinfo return -2 who use "webtest" as hostname, if use "WebTest", getaddrinfo will work well.
so bd31658d is really necessary? if yes, if we should improve the testcase or do anything else to avoid httpAddrGetList testcase from failing ?
https://github.com/OpenPrinting/cups/issues/723 also have the same problems.
To Reproduce Steps to reproduce the behavior:
Expected behavior build and tests success.