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 2012/03/11 07:26:16 UTC

DO NOT REPLY [Bug 52879] New: mod_proxy_fcgi wrong behavior with 304

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

             Bug #: 52879
           Summary: mod_proxy_fcgi wrong behavior with 304
           Product: Apache httpd-2
           Version: 2.4.1
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy_fcgi
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: astrange@ithinksw.com
    Classification: Unclassified


I have a PHP script (run as fastcgi through php-fpm and mod_proxy_fcgi) which
returns a Last-Modified header with no Status header.

At line 746:
http://svn.apache.org/viewvc/httpd/httpd/tags/2.4.1/modules/proxy/mod_proxy_fcgi.c?revision=1243503&view=markup

ap_scan_script_header_err_brigade_ex returned HTTP_NOT_MODIFIED. This caused
the 'status != OK' check to fail and it returned 200 with an empty body.

Seems related to bug 38070.

-- 
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 52879] mod_proxy_fcgi wrong behavior with 304

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

--- Comment #2 from Alexander Strange <as...@ithinksw.com> 2012-04-27 04:27:30 UTC ---
2.4.2 + that patch appears to work.

-- 
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


[Bug 52879] mod_proxy_fcgi wrong behavior with 304

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

Rainer Jung <ra...@kippdata.de> changed:

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

--- Comment #3 from Rainer Jung <ra...@kippdata.de> ---
Applied to 2.4.x in r1331416.
Released with 2.4.3.

-- 
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 52879] mod_proxy_fcgi wrong behavior with 304

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

--- Comment #1 from Stefan Fritsch <sf...@sfritsch.de> 2012-04-21 17:52:35 UTC ---
Can you please check if this patch fixes the problem?

http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c?r1=1311172&r2=1311171&pathrev=1311172

-- 
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


[Bug 52879] mod_proxy_fcgi wrong behavior with 304

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

Francis Asselin <fr...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |francisasselin@gmail.com

-- 
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


[Bug 52879] mod_proxy_fcgi wrong behavior with 304

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

Luke G. <sp...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spizella001@gmail.com
            Version|2.4.4                       |2.4.10

-- 
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


[Bug 52879] mod_proxy_fcgi wrong behavior with 304

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

--- Comment #6 from Luke G. <sp...@gmail.com> ---
Re-opened as Bug 57198

-- 
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


[Bug 52879] mod_proxy_fcgi wrong behavior with 304

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

BC dev team <de...@builderscrack.co.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
           Hardware|PC                          |All
            Version|2.4.1                       |2.4.4
         Resolution|FIXED                       |---
                 OS|FreeBSD                     |All

--- Comment #4 from BC dev team <de...@builderscrack.co.nz> ---
We have been chasing an issue with Apache 2.4.2 and found this bug report. We
upgraded to 2.4.4. This change appears to partially fixed the issue in that
upon a 304 response apache now returns content. However we are still seeing an
error message logged in the following format - "[proxy_fcgi:error] [pid
1226:tid 139673091413760] [client 10.1.2.1:58133] AH01070: Error parsing script
headers".

Upon inspection of the code we think we can see that this message will be
reported when ANYTHING but a 200 OK is generated. Ideally we dont want to see
the error in our apache logs. Can someone investigate?

-- 
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 52879] mod_proxy_fcgi wrong behavior with 304

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

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

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

-- 
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


[Bug 52879] mod_proxy_fcgi wrong behavior with 304

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

Eric Covener <co...@gmail.com> changed:

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

--- Comment #7 from Eric Covener <co...@gmail.com> ---
marking fixed, followup in 57198

-- 
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


[Bug 52879] mod_proxy_fcgi wrong behavior with 304

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

--- Comment #5 from Luke G. <sp...@gmail.com> ---
The patch r1331416 introduced a serious bug: 

In the case described by the original poster (a PHP script run as fastcgi
through php-fpm and mod_proxy_fcgi which returns a Last-Modified header with no
Status header), Apache does indeed now return a 304 status (if a matching
If-not-modified header is in the request) BUT the content of the php script is
also sent. 

This breaks the http protocol as described in rfc2616 section 10.3.5: "The 304
response MUST NOT contain a message-body, and thus is always terminated by the
first empty line after the header fields."

This cause us a serious problem when this kind of request is sent through our
reverse proxy placed just in front of the backends. When the proxy receives
this (invalid) 304 response, it immediately sends a 304 to the client and
ignores the rest of the packet; but the next packets sent by the backend stay
in the tcp stack (the proxy does not expect further content). The reverse proxy
prepends these packets in the response to the next request routed to the same
backend. This, of course, breaks our applications...

Can someone suggests a patch we could test to fix this problem?

-- 
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