View | Details | Raw Unified | Return to bug 37145
Collapse All | Expand All

(-)modules/proxy/proxy_http.c (-1 / +19 lines)
Lines 1081-1089 Link Here
1081
        }
1081
        }
1082
1082
1083
        apr_brigade_length(temp_brigade, 1, &bytes);
1083
        apr_brigade_length(temp_brigade, 1, &bytes);
1084
        APR_BRIGADE_CONCAT(input_brigade, temp_brigade);
1085
        bytes_read += bytes;
1084
        bytes_read += bytes;
1086
1085
1086
        /*
1087
         * Save temp_brigade in input_brigade. (At least) in the SSL case
1088
         * temp_brigade contains transient buckets whose data would get
1089
         * overwritten during the next call of ap_get_brigade in the loop.
1090
         * ap_save_brigade ensures these buckets to be set aside.
1091
         * Calling ap_save_brigade with NULL as filter is OK, because
1092
         * input_brigade already has been created and does not need to get
1093
         * created by ap_save_brigade.
1094
         */
1095
        status = ap_save_brigade(NULL, &input_brigade, &temp_brigade, p);
1096
        if (status != APR_SUCCESS) {
1097
            ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
1098
                         "proxy: processing prefetched request body failed"
1099
                         " to %s from %s (%s)",
1100
                         p_conn->name ? p_conn->name: "",
1101
                         c->remote_ip, c->remote_host ? c->remote_host: "");
1102
            return status;
1103
        }
1104
1087
    /* Ensure we don't hit a wall where we have a buffer too small
1105
    /* Ensure we don't hit a wall where we have a buffer too small
1088
     * for ap_get_brigade's filters to fetch us another bucket,
1106
     * for ap_get_brigade's filters to fetch us another bucket,
1089
     * surrender once we hit 80 bytes less than MAX_MEM_SPOOL
1107
     * surrender once we hit 80 bytes less than MAX_MEM_SPOOL

Return to bug 37145