Re: [PATCH] Add HTTP Status Code Functions to PEAR::HTTP

From: Date: Thu, 20 Nov 2003 12:59:18 +0000
Subject: Re: [PATCH] Add HTTP Status Code Functions to PEAR::HTTP
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-23773@lists.php.net to get a copy of this message
Davey wrote:
Dear All, Please find here[1] a patch to add the following methods to PEAR::HTTP HTTP::statusType - Type of statusCode (as defined in the RFC) HTTP::statusText - The Message for the error code (from RFC) HTTP::isInformational - Is an Informational code (1xx code) HTTP::isSuccessful - Is a Success code (2xx code) HTTP::isRedirect - Is a Redirect code (3xx code) HTTP::isClientError - Is a Client Error code (4xx code) HTTP::isServerError - Is a Server Error code (5xx code) HTTP::isError - Is a Client OR Server Error code (4xx or 5xx code) <snip />
With suggestions from Alan Knowles, I've managed to cut out a HUGE chunk of unnecessary code. Also noticed the tabs/spaces error and fixed that. You can find the new patch here[1] and a package here[2] and a test script here[3] which tests ALL valid HTTP codes and 1 none valid one in each type. - Davey [1] http://pixelated-dreams.com/~davey/PEAR/patches/HTTP.diff [2] http://pixelated-dreams.com/~davey/PEAR/patches/HTTP-1.3.tgz [3] http://pixelated-dreams.com/~davey/PEAR/patches/HTTP_test.php

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