You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2011/07/30 17:22:42 UTC

DO NOT REPLY [Bug 51590] New: The DEFLATE output filter loops infinitely if the first brigade it gets contains only a flush bucket

https://issues.apache.org/bugzilla/show_bug.cgi?id=51590

             Bug #: 51590
           Summary: The DEFLATE output filter loops infinitely if the
                    first brigade it gets contains only a flush bucket
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_deflate
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: torsten.foertsch@gmx.net
    Classification: Unclassified


Created attachment 27332
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27332
a fix

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)) {
                ap_remove_output_filter(f);
                return ap_pass_brigade(f->next, bb);
            }
            if (APR_BUCKET_IS_METADATA(e))
                continue;

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 fix the problem:

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

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 51590] The DEFLATE output filter loops infinitely if the first brigade it gets contains only a flush bucket

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51590

Stefan Fritsch <sf...@sfritsch.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Stefan Fritsch <sf...@sfritsch.de> 2012-02-26 17:12:51 UTC ---
fixed in 2.4.1

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 51590] The DEFLATE output filter loops infinitely if the first brigade it gets contains only a flush bucket

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51590

Stefan Fritsch <sf...@sfritsch.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FixedInTrunk

--- Comment #1 from Stefan Fritsch <sf...@sfritsch.de> 2011-08-01 21:52:42 UTC ---
Good catch. Fixed in r1152943. Added a test in r1152942.

How common is the situation that there are (non-EOS) metadata buckets before
any data buckets? In your opinion, is this bug a showstopper for the 2.3.14
beta release?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org