Commit ac398777 authored by Graham Leggett's avatar Graham Leggett
Browse files

Made the variable naming the same as everywhere else in Apache for the

ap_get_brigade() fix.
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88927 13f79535-47bb-0310-9956-ffa450edef68
parent b100f4ef
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -550,7 +550,7 @@ PROXY_DECLARE (int) ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf
    int i, j, len, rc;
    int one = 1;
    char *size = NULL;
    apr_size_t remain = -1;
    apr_size_t readbytes = -1;

    /* stuff for PASV mode */
    int connect = 0, use_port = 0;
@@ -1574,7 +1574,7 @@ PROXY_DECLARE (int) ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf
		     "proxy: FTP: start body send");

	/* read the body, pass it to the output filters */
	while (ap_get_brigade(remote->input_filters, bb, AP_MODE_BLOCKING, &remain) == APR_SUCCESS) {
	while (ap_get_brigade(remote->input_filters, bb, AP_MODE_BLOCKING, &readbytes) == APR_SUCCESS) {
	    if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
		e = apr_bucket_flush_create();
		APR_BRIGADE_INSERT_TAIL(bb, e);
+5 −5
Original line number Diff line number Diff line
@@ -744,7 +744,7 @@ PROXY_DECLARE (int) ap_proxy_http_handler(request_rec *r, proxy_server_conf *con
    /* send body */
    if (!r->header_only) {
	const char *buf;
	apr_size_t remain;
	apr_size_t readbytes;

	/* if chunked - insert DECHUNK filter */
	if (ap_proxy_liststr((buf = apr_table_get(r->headers_out, "Transfer-Encoding")), "chunked")) {
@@ -754,12 +754,12 @@ PROXY_DECLARE (int) ap_proxy_http_handler(request_rec *r, proxy_server_conf *con
		apr_table_set(r->headers_out, "Transfer-Encoding", buf);
	    }
	    ap_add_input_filter("DECHUNK", NULL, rp, origin);
	    remain = -1;
	    readbytes = -1;
	}

	/* if content length - set the length to read */
	else if ((buf = apr_table_get(r->headers_out, "Content-Length"))) {
	    remain = atol(buf);
	    readbytes = atol(buf);
	}

	/* no chunked / no length therefore read till EOF and cancel keepalive */
@@ -769,14 +769,14 @@ PROXY_DECLARE (int) ap_proxy_http_handler(request_rec *r, proxy_server_conf *con

	/* if keepalive cancelled, read to EOF */
	if (close) {
	    remain = -1;
	    readbytes = -1;
	}

	ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
		     "proxy: start body send");

	/* read the body, pass it to the output filters */
	while (ap_get_brigade(rp->input_filters, bb, AP_MODE_BLOCKING, &remain) == APR_SUCCESS) {
	while (ap_get_brigade(rp->input_filters, bb, AP_MODE_BLOCKING, &readbytes) == APR_SUCCESS) {
	    if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
		e = apr_bucket_flush_create();
		APR_BRIGADE_INSERT_TAIL(bb, e);
+3 −3
Original line number Diff line number Diff line
@@ -1087,11 +1087,11 @@ apr_status_t ap_proxy_string_read(conn_rec *c, apr_bucket_brigade *bb,
{
    apr_bucket *e;
    apr_status_t rv;
    apr_size_t zero = 0;
    apr_size_t readbytes = 0;	/* line-at-a-time */
    char *pos = buff;
    char *response;
    int found = 0;
    size_t len;
    apr_size_t len;

    /* start with an empty string */
    buff[0] = 0;
@@ -1101,7 +1101,7 @@ apr_status_t ap_proxy_string_read(conn_rec *c, apr_bucket_brigade *bb,
    while (!found) {

	/* get brigade from network one line at a time */
	if (APR_SUCCESS != (rv = ap_get_brigade(c->input_filters, bb, AP_MODE_BLOCKING, &zero))) {
	if (APR_SUCCESS != (rv = ap_get_brigade(c->input_filters, bb, AP_MODE_BLOCKING, &readbytes))) {
	    return rv;
	}