Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43707 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71400 invoked from network); 14 Apr 2009 23:44:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Apr 2009 23:44:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.116 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.116 us-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [63.205.162.116] ([63.205.162.116:65280] helo=us-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/B6-50915-4FF15E94 for ; Tue, 14 Apr 2009 19:44:53 -0400 Received: from [192.168.16.112] ([192.168.16.112]) by us-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 14 Apr 2009 16:44:36 -0700 Message-ID: <49E51FF2.4010609@zend.com> Date: Tue, 14 Apr 2009 16:44:50 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Dmitry Stogov CC: PHP Internals , Lukas Kahwe Smith , =?ISO-8859-1?Q?Johannes_Schl=FCter?= , Andi Gutmans , Sara Golemon References: <49E4A4CD.5010809@zend.com> In-Reply-To: <49E4A4CD.5010809@zend.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 14 Apr 2009 23:44:36.0050 (UTC) FILETIME=[F7E5AB20:01C9BD5A] Subject: Re: Support for "Transfer-Encoding: chunked" in http stream wrapper From: stas@zend.com (Stanislav Malyshev) Hi! > The attached patch implements automatic decoding of chunked > transfer-encoding. From what I see in the patch, it requires chunked data prefix to be: XXX\r\n where XXX are from 1 to 3 hex digits. However RFC 2616 defines chunk size as arbitrarily long sequence of HEX digits, and also allows for some stuff (extensions) to be added to the end. I wonder if it'd be better to treat all hex digits as size and then ignore everything until \r\n. Also, I understand that by the RFC chunked encoding should never be sent to HTTP/1.0 clients. So, by default this should never happen unless you manually set protocol version to 1.1 (or the server is broken). -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com