Randy Kobes wrote:
On Mon, 21 Jul 2003, Dan Wilga wrote:


Hi there,

I tried to send this to modperl-dev, but apparently it won't take new
subscriptions. You seem to be one of the developers, so I thought
that perhaps you could look it over.

where did you send the request? modper-dev-subscribe?


I have a ModPerl::Registry script which does its own handling of the
If-Modified-Since header. It returns a "Status: 304" header if the
file has not changed since the given date.

This worked fine with mod_perl 1.x, however in mod_perl 2 (1.99_09),
the following message appears in the error log:

[scriptname] did not send an HTTP header

In some circumstances, this would also generate a 500 error,
apparently because this header was being misinterpreted within
mod_perl:

  [Fri Jul 18 05:56:12 2003] [error] 16872: ModPerl::Registry:
304:Unknown error 304 at [module name and line number].

I traced this to an oversight in the file modperl_filter.c. It did
not consider the 304 to be a successful return. I made the following
modification, and now all's well:

--- orig/mod_perl-1.99_09/src/modules/perl/modperl_filter.c
2003-04-18 01:34:12.000000000 -0400
+++ src/modules/perl/modperl_filter.c   2003-07-18 11:19:07.000000000 -0400
@@ -114,5 +114,5 @@
             return APR_SUCCESS; /* XXX: HTTP_MOVED_TEMPORARILY ? */
         }
-        else if (status != OK) {
+        else if (status != OK && status != HTTP_NOT_MODIFIED) {
             ap_log_error(APLOG_MARK, APLOG_WARNING,
                          0, r->server, "%s did not send an HTTP header",

Can you please post a simple test and the relevant configuration? You can even send a new test for our ModPerl-Registry test suite.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to