Re: HTTP_Request2

From: Date: Tue, 28 Oct 2008 20:41:43 +0000
Subject: Re: HTTP_Request2
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50953@lists.php.net to get a copy of this message
Hi, till wrote:
Is verbatim copying from Zend Framework really a good idea?
Why not? a) It's BSD-licensed code. b) Why do we need to repeat mistakes of others and re-invent the wheel here if the solution they provide is "good"? Or do you have a objection, e.g. code "sucks" (more detailed reasoning would be awesome ;-))).
Their code suffers from the same problem as was described here, it is quite difficult to adapt it to using the cURL extension (or any other extension, for that matter). Note that they only provide socket-based backend. Also there are several corner cases that were fixed in HTTP_Request due to its long history and huge user base (a good example would be handling of gzip-encoded responses) and are not fixed in current ZF. Of course I'm not against borrowing ideas and algorithms from there, just take their actual implementation with a pound of salt. :] I currently see HTTP_Request2 class itself as extremely lightweight, it'll just accumulate request data. Actual building of, say, multipart/form-data body will be left to the socket Adapter, or to cURL Adapter (that'll just forward this task to cURL). The same goes for HTTP_Request2_Response.

« previous php.pear.dev (#50953) next »