HTTP_Request2 heads up: cookie jar and exception hierarchy

From: Date: Sat, 19 Feb 2011 13:49:39 +0000
Subject: HTTP_Request2 heads up: cookie jar and exception hierarchy
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-54098@lists.php.net to get a copy of this message
Hi, I've just committed a cookie jar implementation to SVN, this is a significantly updated version of HTTP_Client_CookieManager with Public Suffix List [1] support added. Please test this if you are interested in the functionality. Note that Public Suffix List itself is released under either of MPL 1.1/GPL 2.0/LGPL 2.1 unlike HTTP_Request2 which is under BSD. Thus I keep the possibility of *not* including and enabling it. I think it is sufficient from licensing POW? Since implementing Cookie Jar took less time than I expected, I think about turning to *the* most popular feature request [2] which deals with error codes and exception subclasses. I suspect that many people on this list are using HTTP_Request2, so I'd like to get some feedback on granularity of error codes / exceptions they need. There is currently a patch [3] attached to the request, but it basically assigns a unique error code for each message or passes the code from underlying extension so it doesn't solve anything IMO. For exception hierarchy I see roughly the following: - pilot errors
    - missing data, passing junk to methods
    - configuration errors (trying to use Curl Adapter without curl enabled; trying to decode gzip/deflate encoded response without gzip)
- network errors
    - connection error: unknown host, connection timeout, SSL validation failure...
    - request timeout
- response errors
    - protocol error: non-HTTP response, broken encoding
    - redirect error: redirect to non-HTTP protocol, maximum number of redirects exceeded
Are there any exception subclasses that are needed but are not present in the above list? If some exception hierarchy is done, then is there a need for some additional error codes (or should we just repackage error codes returned by curl / socket)? [1] http://publicsuffix.org/ [2] http://pear.php.net/bugs/bug.php?id=16762 [3] http://pear.php.net/bugs/bug.php?id=16762&edit=12&patch=Add_error_code_support_10_02_2011&revision=latest

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