The following reply was made to PR mod_jserv/4790; it has been noted by GNATS.
From: Ben Kelley <[EMAIL PROTECTED]>
To: jon * <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: Re: mod_jserv/4790: ajp11: cannot scan servlet headers inmod_jserv.log
Date: Wed, 04 Aug 1999 08:59:29 +1000
This is a multi-part message in MIME format.
--------------FD34BDC3D4762BEF40B53513
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi.
I haven't had a chance to fully test the code, but the piece of code that I
believe to be incorrect is essentially unchanged in the new version.
The old version of jserv_ajpv11.c, lines 419-426 are:
> /* Receive the response from JServ */
> ap_hard_timeout("ajpv11-read", r);
> if (ret=ap_scan_script_header_err_buff(r,buffsocket,NULL)) {
> ap_kill_timeout(r);
> jserv_error(JSERV_LOG_EMERG,cfg,"ajp11: %s",
> "cannot scan servlet headers");
> return SERVER_ERROR;
> }
>
In the new version, lines 462-469 of jserv_ajpv12.c read:
> /* Receive the response from JServ */
> ap_hard_timeout("ajpv12-read", r);
> if (ret=ap_scan_script_header_err_buff(r,buffsocket,NULL)) {
> ap_kill_timeout(r);
> jserv_error(JSERV_LOG_EMERG,cfg,"ajp12: %s",
> "cannot scan servlet headers");
> return SERVER_ERROR;
> }
>
The problem is how the return code form ap_scan_script_header_err_buff is
handled. It seems that ap_scan_script_header_err_buff returns the HTTP status
of the request. In the case of something like a 304 response, both of these
pieces of code will signal an error. The if statement is checking for non-zero
responses. If it gets a 304, it thinks it is an error.
This is what was happening with my servlet that generated a Last-Modified
header. I found this by changing lines 466,467 (in the old version) to
something like:
> jserv_error(JSERV_LOG_EMERG,cfg,"ajp12: %s %d",
> "cannot scan servlet headers", ret);
>
This showed that ret had a value of 304. Definitely not an error.
I will try to find some time to test the code, but unfortunately I am a bit
busy this week. :(
- Ben Kelley.
jon * wrote:
> ben,
>
> Could you please try the latest cvs version of Apache JServ and let us know
> if the problem has been fixed for you? We have switched to a new version of
> the ajp protocol and this issue may have been resolved already. Note that
> you need to edit your configuration files to reflect ajpv12 instead of
> ajpv11.
>
> thanks,
>
> -jon
--
Ben Kelley - [EMAIL PROTECTED] Ph +61 2 9324 2382
Java Architect - Equities IT - Warburg Dillon Read
throw new UserErrorException("User Error: " +
"Replace user and press <enter> to continue");
Warburg Dillon Read - Sydney - Australia - Earth etc etc
--------------FD34BDC3D4762BEF40B53513
Content-Type: text/x-vcard; charset=us-ascii;
name="ben_kelley.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Ben Kelley
Content-Disposition: attachment;
filename="ben_kelley.vcf"
begin:vcard
n:Kelley;Ben
tel;fax:+61 2 9324 2400
tel;work:+61 2 9324 2382
x-mozilla-html:TRUE
url:http://www.ozemail.com.au/~bkelley
org:Warburg Dillon Read;Information Technology
version:2.1
email;internet:[EMAIL PROTECTED]
title:Technical Consultant
adr;quoted-printable:;;Level 24, Governor Phillip Tower=0D=0A1 Farrer
Place;Sydney;NSW;2000;Australia
x-mozilla-cpt:;31680
fn:Ben Kelley
end:vcard
--------------FD34BDC3D4762BEF40B53513
Content-Type: text/plain; charset=us-ascii; name="disclaim.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Content-Description: Legal Disclaimer
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
--------------FD34BDC3D4762BEF40B53513--