httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Förtsch <>
Subject Problem in mod_deflate
Date Sat, 30 Jul 2011 15:41:39 GMT

the DEFLATE output filter contains this piece of code (as of server magic
number 20110724)

    if (!ctx) {
        char *token;
        const char *encoding;

        /* Delay initialization until we have seen some data */
        e = APR_BRIGADE_FIRST(bb);
        while (1) {
            apr_status_t rc;
            if (e == APR_BRIGADE_SENTINEL(bb))
                return ap_pass_brigade(f->next, bb);
            if (APR_BUCKET_IS_EOS(e)) {
                return ap_pass_brigade(f->next, bb);
            if (APR_BUCKET_IS_METADATA(e))

If there is no filter context yet and the passed brigade contains only a
metadata bucket (a flush bucket for example) the "continue" statement is 
hit without changing "e". Hence, it enters an infinite loop.

The last "if" statement should read as follows to avoid the loop:

            if (APR_BUCKET_IS_METADATA(e)) {
                e = APR_BUCKET_NEXT(e);

Filed as

Torsten Förtsch

Need professional modperl support? Hire me! (

Like fantasy?

View raw message