Author: torsten
Date: Sun Apr 4 12:27:07 2010
New Revision: 930669
URL: http://svn.apache.org/viewvc?rev=930669&view=rev
Log:
see http://www.gossamer-threads.com/lists/modperl/dev/101334
Modified:
perl/modperl/trunk/src/modules/perl/mod_perl.c
Modified: perl/modperl/trunk/src/modules/perl/mod_perl.c
URL:
http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/mod_perl.c?rev=930669&r1=930668&r2=930669&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/mod_perl.c (original)
+++ perl/modperl/trunk/src/modules/perl/mod_perl.c Sun Apr 4 12:27:07 2010
@@ -991,7 +991,7 @@ apr_status_t modperl_response_finish(req
return modperl_wbucket_flush(rcfg->wbucket, FALSE);
}
-static int modperl_response_handler_run(request_rec *r, int finish)
+static int modperl_response_handler_run(request_rec *r)
{
int retval;
@@ -1003,13 +1003,6 @@ static int modperl_response_handler_run(
r->handler = r->content_type; /* let http_core or whatever try */
}
- if (finish) {
- apr_status_t rc = modperl_response_finish(r);
- if (rc != APR_SUCCESS) {
- retval = rc;
- }
- }
-
return retval;
}
@@ -1019,7 +1012,7 @@ int modperl_response_handler(request_rec
#ifdef USE_ITHREADS
MP_dRCFG;
#endif
- apr_status_t retval;
+ apr_status_t retval, rc;
#ifdef USE_ITHREADS
pTHX;
@@ -1043,7 +1036,11 @@ int modperl_response_handler(request_rec
modperl_env_request_populate(aTHX_ r);
}
- retval = modperl_response_handler_run(r, TRUE);
+ retval = modperl_response_handler_run(r);
+ rc = modperl_response_finish(r);
+ if (rc != APR_SUCCESS) {
+ retval = rc;
+ }
#ifdef USE_ITHREADS
if (MpInterpPUTBACK(interp)) {
@@ -1099,7 +1096,7 @@ int modperl_response_handler_cgi(request
modperl_env_request_tie(aTHX_ r);
- retval = modperl_response_handler_run(r, FALSE);
+ retval = modperl_response_handler_run(r);
modperl_env_request_untie(aTHX_ r);