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

(-)mod_fcgid-2.3.7/modules/fcgid/fcgid_proc_unix.c (-3 / +10 lines)
Lines 774-787 apr_status_t proc_write_ipc(fcgid_ipc *i Link Here
774
    struct iovec vec[FCGID_VEC_COUNT];
774
    struct iovec vec[FCGID_VEC_COUNT];
775
    int nvec = 0;
775
    int nvec = 0;
776
    apr_bucket *e;
776
    apr_bucket *e;
777
    apr_bucket_brigade* tmpbb = apr_brigade_create(output_brigade->p,output_brigade->bucket_alloc);
778
779
    while (!APR_BRIGADE_EMPTY(output_brigade)) {
780
        e = APR_BRIGADE_FIRST(output_brigade);
777
781
778
    for (e = APR_BRIGADE_FIRST(output_brigade);
779
         e != APR_BRIGADE_SENTINEL(output_brigade);
780
         e = APR_BUCKET_NEXT(e)) {
781
        apr_size_t len;
782
        apr_size_t len;
782
        const char* base;
783
        const char* base;
783
784
784
        if (APR_BUCKET_IS_METADATA(e)) {
785
        if (APR_BUCKET_IS_METADATA(e)) {
786
            apr_bucket_delete(e);
785
            continue;
787
            continue;
786
        }
788
        }
787
789
Lines 792-797 apr_status_t proc_write_ipc(fcgid_ipc *i Link Here
792
            return rv;
794
            return rv;
793
        }
795
        }
794
796
797
        APR_BUCKET_REMOVE(e);
798
        APR_BRIGADE_INSERT_TAIL(tmpbb, e);
799
795
        vec[nvec].iov_len = len;
800
        vec[nvec].iov_len = len;
796
        vec[nvec].iov_base = (char*) base;
801
        vec[nvec].iov_base = (char*) base;
797
        if (nvec == (FCGID_VEC_COUNT - 1)) {
802
        if (nvec == (FCGID_VEC_COUNT - 1)) {
Lines 801-806 apr_status_t proc_write_ipc(fcgid_ipc *i Link Here
801
                               FCGID_VEC_COUNT)) != APR_SUCCESS)
806
                               FCGID_VEC_COUNT)) != APR_SUCCESS)
802
                return rv;
807
                return rv;
803
            nvec = 0;
808
            nvec = 0;
809
            apr_brigade_cleanup(tmpbb);
804
        }
810
        }
805
        else
811
        else
806
            nvec++;
812
            nvec++;
Lines 812-817 apr_status_t proc_write_ipc(fcgid_ipc *i Link Here
812
            return rv;
818
            return rv;
813
    }
819
    }
814
820
821
    apr_brigade_destroy(tmpbb);
815
    return APR_SUCCESS;
822
    return APR_SUCCESS;
816
}
823
}
817
824

Return to bug 51747