-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) core: Fix error handling in ap_scan_script_header_err_brigade() if there
+ is no EOS bucket in the brigade. Fixes segfault with mod_proxy_fcgi.
+ PR 48272. [Stefan Fritsch]
+
*) mod_proxy_fcgi: If there is an error reading the headers from the
backend, send an error to the client. [Stefan Fritsch]
if (!(l = strchr(w, ':'))) {
if (!buffer) {
/* Soak up all the script output - may save an outright kill */
- while ((*getsfunc) (w, MAX_STRING_LEN - 1, getsfunc_data)) {
+ while ((*getsfunc)(w, MAX_STRING_LEN - 1, getsfunc_data) > 0) {
continue;
}
}
apr_status_t rv;
int done = 0;
- while ((dst < dst_end) && !done && !APR_BUCKET_IS_EOS(e)) {
+ while ((dst < dst_end) && !done && e != APR_BRIGADE_SENTINEL(bb)
+ && !APR_BUCKET_IS_EOS(e)) {
const char *bucket_data;
apr_size_t bucket_data_len;
const char *src;
e = next;
}
*dst = 0;
- return 1;
+ return done;
}
AP_DECLARE(int) ap_scan_script_header_err_brigade(request_rec *r,