Re: Package proposal: HTTP_Status
| From: | Stefan Neufeind | Date: | Tue, 26 Aug 2003 13:07:02 +0000 |
| Subject: | Re: Package proposal: HTTP_Status | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20554@lists.php.net to get a copy of this message | ||
On 26 Aug 2003 at 14:52, Alexey Borzov wrote:
> Marshall Roch wrote:
>
> > I've created a class called HTTP_Status that translates HTTP
> > (including WebDAV) status codes (e.g. 200, 404, 304) into
> > human-readable form (respectively "OK", "Not Found", "Not
> > Modified"). It also has methods to check whether a given status
> > code is "informational," "success," "redirection,"
> > "client error,"
> > or "server error." There are a number of classes already in PEAR
> > that could make use of this.
>
> -1 for the standalone package. I don't quite see the problem it is
> trying to solve. 1) Mapping from response codes to their meanings can
> easily be done via an array. 2) Getting the type of response can be
> done via
[...]
Hmm - the "standalone package" needs discussion, right. But having
funtions to easily classify a responside (isRedirect or something)
would be quite helpful. And I mean not doing it using switch-
statement over and over again, inventint the wheel again every time.
Would this maybe fit into a HTTP_Header-package or whatever? Maybe
this function is not used for creation of headers but for parsing the
status codes / headers? Might that be a good solution?
Stefan