cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: another fix for HEAD?
Date Wed, 07 Jun 2000 18:53:46 GMT
On Wed, 7 Jun 2000, Jeremy Quinn wrote:

> Dear All,
> 
> In what may constitute my first bug patch :)
> 
> May I most humbly propose that the following change is made to Engine.java.
> 
> Change (line 369)
> 
> // if verbose mode is on the the output type allows it
> // print some processing info as a comment
> if (VERBOSE && (page.isText())) {
> 	time = System.currentTimeMillis() - time;
> 	out.println("<!-- This page was served "
> 		+ (page.isCached() ? "from cache " : "")
> 		+ "in " + time + " milliseconds by "
>     + Cocoon.version() + " -->");
> }
> 
> to
> 
> if (VERBOSE && (page.isText()) && (request.getMethod() != "HEAD")) {
> 	time = System.currentTimeMillis() - time;
> 	out.println("<!-- This page was served "
> 		+ (page.isCached() ? "from cache " : "")
> 		+ "in " + time + " milliseconds by "
>     + Cocoon.version() + " -->");
> }
> 
> This probably is not right, but it shows what I think needs to happen.

Looks good to me, except for the fact that

String != String

is not correct, you need to do

!String.equals(String)

I checked it into CVS, see if it helps you out.

- donald


Mime
View raw message