Re: ob_gzhandler broken
| From: | (Marcus Börger) | Date: | Thu, 22 Aug 2002 23:17:35 +0000 |
| Subject: | Re: ob_gzhandler broken | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-87325@lists.php.net to get a copy of this message | ||
You're right Zeev that does not work in ob_gzhandler...
I'am trying it with the following patch but i have to wait for a new complete rebuild....(and for me it was 43 con leche)
cvs -z3 -q diff -w ext\zlib\zlib.c (in directory S:\php4\)
Index: ext/zlib/zlib.c
===================================================================
RCS file: /repository/php4/ext/zlib/zlib.c,v
retrieving revision 1.147
diff -u -w -r1.147 zlib.c
--- ext/zlib/zlib.c 22 Aug 2002 17:37:46 -0000 1.147 +++ ext/zlib/zlib.c 22 Aug 2002 23:10:48 -0000@@ -18,7 +18,7 @@
| Jade Nicoletti <nicoletti@nns.ch> |
+----------------------------------------------------------------------+
*/
-/* $Id: zlib.c,v 1.147 2002/08/22 17:37:46 wez Exp $ */
+/* $Id: zlib.c,v 1.146 2002/08/22 09:38:55 sr Exp $ */
#define IS_EXT_MODULE
#ifdef HAVE_CONFIG_H
@@ -917,7 +917,9 @@
} else if(php_memnstr(Z_STRVAL_PP(a_encoding), "deflate", 7, Z_STRVAL_PP(a_encoding) + Z_STRLEN_PP(a_encoding))) {
coding = CODING_DEFLATE;
} else {
- RETURN_FALSE;
+ zval_copy_ctor(return_value);
+ ZLIBG(ob_gzhandler_status)=-1;
+ return;
}
At 00:50 23.08.2002, Zeev Suraski wrote:
ob_gzhandler() returns false in case compression is not needed; Now, supposedly the output buffering system is supposed to send the string as-is if the output handler returns false, but at least now I cannot find any place in the code where it does that. It is 2am in the morning and I am somewhat beered though, so things may look different in the morning :) At 01:46 23/08/2002, Marcus Börger wrote:Hmm, interesting, both compressions use the same code to verify if compression will be accepted....could you try cvs version since some changes were committed just lately? regards marcus At 22:42 22.08.2002, you wrote:There are two mechanisms for compressing output in PHP. One is broke. The other works fine. You will see that phorum.org is now using the one that works. For the dev list: ob_gzhandler does do what this email says. zlib.output_compression does not. i would submit this to the bug list, but it seems that there are already several bugs about ob_gzhandler and that the general feeling is that it needs to be canned. Brian. phorum.org ----- Original Message ----- From: "Andreas Oesterhelt" <oes@oesterhelt.org> To: <brian@phorum.org> Sent: Wednesday, August 21, 2002 3:21 PM Subject: Phorum.org misconfigured? | Hi Brian, | | ..cathy subject, eh? Sorry to trouble you with this: Being a developer | of the soon-to-be-released Pivoxy HTTP proxy I stumbled accross a problem | our software is having with your (and other) sites and that I believe | is a fault in those sites' PHP/Apache setups. | | Every HTTP request that carries the (completely legal!) HTTP header | "Accept-Encoding: identity;q=1.0, *;q=0" is answered with a completely | empty response. Same goes for "Accept-Encoding:". Both are legal ways | to tell the server that we don't want the response compressed in any | way. | | Since I failed to set up a server which has the same problem on my | own machine, I would be *VERY* thankful if you could give tracing the | problem at least a quick shot. | | For now, we'll just not send any Accept-Encoding: header at all, but, | according to rfc2616, then "the server MAY assume that the client will | accept any content coding." which is not what I want. | | I know that you are not responsible or authoritative for any flaws in | PHP or apache, but as you seem to have experience with a major project | in PHP, *and* run a site that is affected by the problem, I hope I might | raise your interest in the question. | | Your feedback will be very much appreciated. | | Best regards, | --Andreas | | | -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php