Mirar @ Pike developers forum wrote:
Would it be possible for someone to sneak in this bugfix in Query.pike at some stage?
- return
hostname_cache[hostname] =
( sizeof(hosts) && hosts[random(sizeof( hosts ))] );
to make the hostname_cache in Protocols.HTTP.Session work as intended.
I seem to notice two things:
- We're not using the DNS supplied TTL in the hostname_cache. I'd consider that to be undesirable behaviour of a DNS cache, it leads to all kinds of hard-to-trace bugs in accessing some sites with intentionally low TTLs (load balancing, failover, or dynamic IPs).
- We're not expiring hostname_cache entries anywhere, it seems.
How is this supposed to work?