Re: Support for "Transfer-Encoding: chunked" in http stream wrapper

From: Date: Wed, 15 Apr 2009 02:04:29 +0000
Subject: Re: Support for "Transfer-Encoding: chunked" in http stream wrapper
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-43708@lists.php.net to get a copy of this message
> The attached patch implements automatic decoding of chunked > transfer-encoding. > > Any objections against committing the patch into PHP_5_3? > I didn't have objections when I offered this filter several years ago, and I still don't. I do recall Andi (or perhaps it was someone else) saying it was adding unnecessary complexity to the http wrapper and such things should be left for cURL though, and this is why it didn't go into 5.1 > Maybe someone has ideas about patch improvements? > I'd add a context option to disable automatic application of the filter, and register the filter with the streams layer so that it can be applied manually. (And of course, I'd second Stas' comment wrt chunk-header length) The issue wrt 1.0 versus 1.1 is fairly moot. If the caller doesn't override the version then the server won't send chunked encoding. They are capable of doing so however, and they may already be doing it (e.g. for a streaming client). So the concern about potential BC breakage for apps still exists, it's just less severe (since I doubt many apps *are* explicitly setting the version to 1.1) -Sara

« previous php.internals (#43708) next »