I believe I've found where the negotiate content should be used. Looking at
Directory.java:
public Handler findTarget(Request request, Response response) {
try {
return Engine.getInstance().createDirectoryResource(this,
request,
response);
} catch (IOException ioe) {
getLogger().log(Level.WARNING,
"Unable to find the directory's resource", ioe);
return null;
}
}
This is creating and return a DirectoryResource instance. Deeper down
inside Resource.java (line 431) isNegotiateContent() is used, but is
defaulting to true as the Directory instance is never passing down the
setting.
Changing Directory.java's findTarget() method to setNegotiateContent() on
the newly created DirectoryResource before returning it looks to be the
logical fix (I've not yet tried this thou).
Mark
On Wed, May 7, 2008 at 4:09 AM, Jeroen Goubert <[EMAIL PROTECTED]> wrote:
> Hello,
>
> the Directory class has a method "setNegotiateContent(boolean
> negotiateContent)" which can be used to indicate that content negotiation
> should not happen (by default best content is automatically negotiated).
> It seems however that this setter has no impact since the
> "isNegotiateContent()" is nowhere used in the codebase: the
> DirectoryResource implementation always tries to do content negotation.
>
> I think DirectoryResource should look at the negotiateContent-indication or
> am I missing something ?
>
> Best regards,
> Jeroen
>
>
> **** DISCLAIMER ****
> http://www.schaubroeck.be/maildisclaimer.htm
>
--
"It is easier to optimize correct code than to correct optimized code." --
Bill Harlan