Re: Making Net_URL2 Stable
| From: | Alexey Borzov | Date: | Thu, 21 Jul 2011 16:33:42 +0000 |
| Subject: | Re: Making Net_URL2 Stable | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-54406@lists.php.net to get a copy of this message | ||
Hi Bertrand,
On 21.07.2011 15:27, Bertrand Mansion wrote:
The removeDotSegments() method looks a bit weak with its while() loop and its comment : "Make sure not to be trapped in an infinite loop due to a bug in this method" ...Hopefully there isn't an actual infinite loop bug there and this is just a "safety valve"...
I suggest that you use an explode('/') on $path, then iterate to fill a second array with tokens from $path using an index that increase/decrease according to the '..' it meets....and we have such a method in HTML_QuickForm2, in fact: http://svn.php.net/viewvc/pear/packages/HTML_QuickForm2/trunk/HTML/QuickForm2/Controller/Action/Jump.php?revision=311435&view=markup (see HTML_QuickForm2_Controller_Action_Jump::normalizePath()) However, both of these methods use the test suite described in RFC 3986 so probably are on the same level of robustness: http://svn.php.net/viewvc/pear/packages/Net_URL2/trunk/tests/Net/URL2Test.php?revision=309226&view=markup (see testResolve()) http://svn.php.net/viewvc/pear/packages/HTML_QuickForm2/trunk/tests/QuickForm2/Controller/Action/JumpTest.php?revision=309664&view=markup (see testRedirectToAbsoluteUrl()) Speaking of test suites, why aren't tests for Net_URL2 added to package.xml and consequently installed with the package?
On Thu, Jul 21, 2011 at 1:05 PM, till<till@php.net> wrote:This is still open: http://pear.php.net/bugs/bug.php?id=14399 Can you check it out and either close/wontfix, etc.? On Tue, Jul 19, 2011 at 4:47 PM, David Coallier<davidc@php.net> wrote:Thanks Alexey, Not planning on any BC breaks just now. Cheers, -- David Coallier -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php