this was committed separately, as it's not really part of the PerlDefaultPortHandler implementation.

open for discussion, though, is whether we want to keep or remove this kind of logic from modperl_callback.

as I think about it more, I'm kinda against second-guessing handlers here - we ought to assume they return what they mean to return. this will be especially true in protocol handlers, where in order to return status codes over 600 (which the protocol may very well have) we would need to duplicate Perl callback logic.

as the test suite passes, and I can't think of a good reason why returning 2 or 914 from a handler ought to really mean OK, I think it is safe to remove it without causing too much trouble. if somebody complains, we can evaluate whether what they are doing is legitimate, or whether the EU needs to change their approach.

in fact, I'm actually in favor of removing HTTP_OK logic too in order to make things completely protocol-independent (and reusable for all Perl callbacks) - people shouldn't be returning HTTP_OK from their handler and thinking it is equivalent to OK.

--Geoff

[EMAIL PROTECTED] wrote:
geoff 2003/10/07 12:16:13

Modified: src/modules/perl modperl_callback.c
Log:
alter modperl_callback so that return values are propagated
to Apache just as they were returned from the Perl callback -
no second-guessing the status the callback wanted to return.
Revision Changes Path
1.61 +2 -3 modperl-2.0/src/modules/perl/modperl_callback.c
Index: modperl_callback.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- modperl_callback.c 2 Oct 2003 17:45:52 -0000 1.60
+++ modperl_callback.c 7 Oct 2003 19:16:13 -0000 1.61
@@ -82,9 +82,8 @@
/* ModPerl::Util::exit doesn't return an integer value */
status = OK; }
- /* assume OK for non-http status codes and for 200 (HTTP_OK) */
- if (((status > 0) && (status < 100)) ||
- (status == 200) || (status > 600)) {
+ /* assume OK for 200 (HTTP_OK) */
+ if ((status == 200)) {
status = OK;
}
}


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



Reply via email to