On Thu, 28 Sep 2000, Bill Moseley wrote:
> Nope. I just downloaded a fresh 1.24, and 1.3.12 and built with
ah, it happens for non-Registry handlers. patch below fixes. you can
also change your handler to:
sub handler {
my $r = shift;
$r->exit(HTTP_NOT_MODIFIED);
}
> BTW --disable-module=include causes:
> modules/ssi.........FAILED before any test output arrived
>
> Any way to detect that SSI is disabled and not run the test?
yeah, i'll fix that.
Index: src/modules/perl/mod_perl.c
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v
retrieving revision 1.129
diff -u -r1.129 mod_perl.c
--- src/modules/perl/mod_perl.c 2000/09/27 16:13:28 1.129
+++ src/modules/perl/mod_perl.c 2000/09/29 16:24:42
@@ -1654,14 +1654,17 @@
SPAGAIN;
- if(perl_eval_ok(r->server) != OK) {
- dTHRCTX;
- MP_STORE_ERROR(r->uri, ERRSV);
- if (r->notes) {
- ap_table_set(r->notes, "error-notes", SvPVX(ERRSV));
+ if ((status = perl_eval_ok(r->server)) != OK) {
+ dTHRCTX;
+ if (status == SERVER_ERROR) {
+ MP_STORE_ERROR(r->uri, ERRSV);
+ if (r->notes) {
+ ap_table_set(r->notes, "error-notes", SvPVX(ERRSV));
+ }
}
- if(!perl_sv_is_http_code(ERRSV, &status))
- status = SERVER_ERROR;
+ else if (status == DECLINED) {
+ status = r->status == 200 ? OK : r->status;
+ }
}
else if(count != 1) {
mod_perl_error(r->server,
Index: src/modules/perl/perl_util.c
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/perl_util.c,v
retrieving revision 1.42
diff -u -r1.42 perl_util.c
--- src/modules/perl/perl_util.c 2000/09/28 21:00:47 1.42
+++ src/modules/perl/perl_util.c 2000/09/29 16:24:48
@@ -677,17 +677,27 @@
int perl_eval_ok(server_rec *s)
{
+ int status;
SV *sv;
dTHR;
dTHRCTX;
sv = ERRSV;
- if(SvTRUE(sv)) {
- MP_TRACE_g(fprintf(stderr, "perl_eval error: %s\n", SvPV(sv,na)));
- mod_perl_error(s, SvPV(sv, na));
- return -1;
+ if (SvTRUE(sv)) {
+ /* Apache::exit was called */
+ if (SvMAGICAL(sv) && (SvCUR(sv) > 4) &&
+ strnEQ(SvPVX(sv), " at ", 4))
+ {
+ return DECLINED;
+ }
+ if (perl_sv_is_http_code(ERRSV, &status)) {
+ return status;
+ }
+ MP_TRACE_g(fprintf(stderr, "perl_eval error: %s\n", SvPV(sv,na)));
+ mod_perl_error(s, SvPV(sv, na));
+ return SERVER_ERROR;
}
- return 0;
+ return OK;
}
int perl_sv_is_http_code(SV *errsv, int *status)