Lines 757-763
Link Here
|
757 |
p = r->main ? r->main->pool : r->pool; |
757 |
p = r->main ? r->main->pool : r->pool; |
758 |
|
758 |
|
759 |
argv0 = apr_filepath_name_get(r->filename); |
759 |
argv0 = apr_filepath_name_get(r->filename); |
760 |
nph = !(strncmp(argv0, "nph-", 4)); |
760 |
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Identifying cgi script:%s", r->filename); |
|
|
761 |
nph = ( strstr(argv0,"nph-") != NULL ); |
762 |
if (nph) |
763 |
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Identified an nph-cgi script"); |
764 |
else |
765 |
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Identified a non nph-cgi script"); |
766 |
|
761 |
conf = ap_get_module_config(r->server->module_config, &cgi_module); |
767 |
conf = ap_get_module_config(r->server->module_config, &cgi_module); |
762 |
|
768 |
|
763 |
if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r)) |
769 |
if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r)) |
Lines 974-992
Link Here
|
974 |
rv = ap_pass_brigade(r->output_filters, bb); |
980 |
rv = ap_pass_brigade(r->output_filters, bb); |
975 |
} |
981 |
} |
976 |
else /* nph */ { |
982 |
else /* nph */ { |
977 |
struct ap_filter_t *cur; |
983 |
/* Now get rid of all filters up through protocol... since we |
978 |
|
|
|
979 |
/* get rid of all filters up through protocol... since we |
980 |
* haven't parsed off the headers, there is no way they can |
984 |
* haven't parsed off the headers, there is no way they can |
981 |
* work |
985 |
* work |
982 |
*/ |
986 |
*/ |
|
|
987 |
/* check to see if r is the main request */ |
988 |
if (ap_is_initial_req(r) != 1) { |
989 |
request_rec* rp = r->prev; |
990 |
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "This request is a sub %d",rp); |
991 |
struct ap_filter_t *mof; |
992 |
mof = rp->output_filters; |
993 |
while ( mof ) { |
994 |
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Found filter: %s",mof->frec->name); |
995 |
mof = mof->next; |
996 |
} |
997 |
mof = rp->connection->output_filters; |
998 |
while ( mof && mof->frec->ftype < AP_FTYPE_TRANSCODE ) { |
999 |
mof = mof->next; |
1000 |
} |
1001 |
rp->connection->output_filters = rp->output_filters = rp->proto_output_filters = mof; |
1002 |
} else { |
1003 |
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "This request is not a sub %d",r->prev); |
1004 |
} |
1005 |
struct ap_filter_t *cur; |
1006 |
|
1007 |
cur = r->output_filters; |
1008 |
while ( cur ) { |
1009 |
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Found filter: %s",cur->frec->name); |
1010 |
cur = cur->next; |
1011 |
} |
1012 |
|
1013 |
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "nph-cgi bypassing filters.."); |
983 |
|
1014 |
|
984 |
cur = r->proto_output_filters; |
1015 |
cur = r->connection->output_filters; |
985 |
while (cur && cur->frec->ftype < AP_FTYPE_CONNECTION) { |
1016 |
while (cur && cur->frec->ftype < AP_FTYPE_TRANSCODE ) { |
986 |
cur = cur->next; |
1017 |
cur = cur->next; |
987 |
} |
1018 |
} |
988 |
r->output_filters = r->proto_output_filters = cur; |
1019 |
r->connection->output_filters = r->output_filters = r->proto_output_filters = cur; |
989 |
|
1020 |
|
|
|
1021 |
cur = r->output_filters; |
1022 |
while ( cur ) { |
1023 |
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Remaining filter: %s",cur->frec->name); |
1024 |
cur = cur->next; |
1025 |
} |
1026 |
|
990 |
rv = ap_pass_brigade(r->output_filters, bb); |
1027 |
rv = ap_pass_brigade(r->output_filters, bb); |
991 |
} |
1028 |
} |
992 |
|
1029 |
|
Lines 1000-1006
Link Here
|
1000 |
} |
1037 |
} |
1001 |
|
1038 |
|
1002 |
apr_file_close(script_err); |
1039 |
apr_file_close(script_err); |
1003 |
|
|
|
1004 |
return OK; /* NOT r->status, even if it has changed. */ |
1040 |
return OK; /* NOT r->status, even if it has changed. */ |
1005 |
} |
1041 |
} |
1006 |
|
1042 |
|