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

(-)mod_fcgid-2.3.6.orig/modules/fcgid/fcgid_proc_unix.c (-3 / +6 lines)
Lines 771-780 apr_status_t proc_write_ipc(fcgid_ipc *i Link Here
771
    struct iovec vec[FCGID_VEC_COUNT];
771
    struct iovec vec[FCGID_VEC_COUNT];
772
    int nvec = 0;
772
    int nvec = 0;
773
    apr_bucket *e;
773
    apr_bucket *e;
774
    apr_bucket_brigade* tmpbb = apr_brigade_create(output_brigade->p,output_brigade->bucket_alloc);
774
775
775
    for (e = APR_BRIGADE_FIRST(output_brigade);
776
    while ((e = APR_BRIGADE_FIRST(output_brigade)) != APR_BRIGADE_SENTINEL(output_brigade)) {
776
         e != APR_BRIGADE_SENTINEL(output_brigade);
777
         e = APR_BUCKET_NEXT(e)) {
778
        /* Read bucket */
777
        /* Read bucket */
779
        apr_size_t len;
778
        apr_size_t len;
780
        const char* base;
779
        const char* base;
Lines 784-789 apr_status_t proc_write_ipc(fcgid_ipc *i Link Here
784
                          "mod_fcgid: can't read request from bucket");
783
                          "mod_fcgid: can't read request from bucket");
785
            return rv;
784
            return rv;
786
        }
785
        }
786
        APR_BUCKET_REMOVE(e);
787
	APR_BRIGADE_INSERT_TAIL(tmpbb, e);
787
788
788
        vec[nvec].iov_len = len;
789
        vec[nvec].iov_len = len;
789
        vec[nvec].iov_base = (char*) base;
790
        vec[nvec].iov_base = (char*) base;
Lines 794-799 apr_status_t proc_write_ipc(fcgid_ipc *i Link Here
794
                               FCGID_VEC_COUNT)) != APR_SUCCESS)
795
                               FCGID_VEC_COUNT)) != APR_SUCCESS)
795
                return rv;
796
                return rv;
796
            nvec = 0;
797
            nvec = 0;
798
            apr_brigade_cleanup(tmpbb);
797
        }
799
        }
798
        else
800
        else
799
            nvec++;
801
            nvec++;
Lines 804-809 apr_status_t proc_write_ipc(fcgid_ipc *i Link Here
804
        if ((rv = writev_it_all(ipc_handle, vec, nvec)) != APR_SUCCESS)
806
        if ((rv = writev_it_all(ipc_handle, vec, nvec)) != APR_SUCCESS)
805
            return rv;
807
            return rv;
806
    }
808
    }
809
    apr_brigade_destroy(tmpbb);
807
810
808
    return APR_SUCCESS;
811
    return APR_SUCCESS;
809
}
812
}

Return to bug 51747