1.5 ignoring networkaddress.cache property?
Nick Johnson
freebsd at spatula.net
Wed Aug 22 10:59:10 PDT 2007
I've noticed that 1.5 seems to be ignoring the value set for
networkaddress.cache.negative.ttl in
$JAVA_HOME/jre/lib/security/java.policy when a DNS request times out.
In one of my forms I validate user-provided URLs by trying to fetch them
and ensuring I get a reasonable response (e.g., not 404, 403, 500, etc).
If the DNS request for the hostname in the URL times out once, the JRE
never tries a lookup again. I've verified that it isn't asking by
snooping DNS traffic on my loopback with tcpdump.
Positive lookups do cache properly. Negative lookups that *don't* time
out (ie, they get an NXDOMAIN response) also seem to obey the
networkaddress.cache.negative.ttl property.
So the behaviour seems to be that a DNS timeout is cached forever, whereas
postive or negative responses are cached according to
networkaddress.cache.*.
Nick
--
"Courage isn't just a matter of not being frightened, you know. It's being
afraid and doing what you have to do anyway."
Doctor Who - Planet of the Daleks
This message has been brought to you by Nick Johnson 2.3b1 and the number 6.
http://healerNick.com/ http://morons.org/ http://spatula.net/
More information about the freebsd-java
mailing list