Commit e903ef6e authored by Aaron Bannert's avatar Aaron Bannert
Browse files

Cautiously avoiding the scoping issue that was discussed on the list,

I thought these other changes needed to go in; Namely that we don't
need to check if the brigade is empty twice in the loop, just once.
Added a comment for good measure.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91478 13f79535-47bb-0310-9956-ffa450edef68
parent f1e23e59
Loading
Loading
Loading
Loading
+13 −14
Original line number Diff line number Diff line
@@ -1370,9 +1370,9 @@ AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bu
                                                    &core_module);
    apr_bucket_brigade *bb = req_cfg->bb;

    do {
    /* read until we get a non-empty brigade */
    while (APR_BRIGADE_EMPTY(bb)) {
        apr_off_t len_read;
        if (APR_BRIGADE_EMPTY(bb)) {
        len_read = r->remaining;
        if (ap_get_brigade(r->input_filters, bb, AP_MODE_BLOCKING,
                           &len_read) != APR_SUCCESS) {
@@ -1385,7 +1385,6 @@ AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bu
        }
        r->remaining -= len_read;
    } 
    } while (APR_BRIGADE_EMPTY(bb));

    b = APR_BRIGADE_FIRST(bb);
    if (APR_BUCKET_IS_EOS(b)) { /* reached eos on previous invocation */