hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ossf...@dubioso.net>
Subject Re: version detection ideas
Date Sun, 10 Jun 2007 19:09:37 GMT
Hello Sebastian,

>> Access the JAR file from somewhere in the classpath to generate
>> an MD5 sum at runtime? I don't think that's an option, and in
>> particular not for a class that's supposed to go into HttpCore.
>> File access and a cryptographic hash sum just for debug output?
> Not sure I understand the objection...
> It would only need to be done once per jar, and only if debug was enabled.

Problem 1: how do I get the JAR file from the classloader?
Assuming there is a JAR _file_ in the first place, and not
some other kind of archive that's accessed in a non-file
way, such as an HTTP classloader or an .ear/.war archive.
Even if we had a method to get entries for a PATH variable
from a classloader, how'd we know which of the entries is
the library in question? The JAR file could be renamed, or
classes from several JARs might be joined into one.

Problem 2: we even try to avoid System.getProperties in
HttpCore, since that operation is subject to permissions
checked by a security manager. There is no file access
required for the functionality HttpCore provides, why
should we require that permission for debug output? And
in an embedded environment we may not even have a file
system. Nor a provider for cryptographic hash sums.


To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org

View raw message