Re: Bug #20308 (Feature Request)
| From: | Sterling Hughes | Date: | Wed, 27 Nov 2002 21:32:42 +0000 |
| Subject: | Re: Bug #20308 (Feature Request) | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-91846@lists.php.net to get a copy of this message | ||
> On November 27, 2002 04:45 pm, Sara "Pollita" Golemon wrote:
> > That was one of the comments I was looking for "Is this really necessary?"
> > After all the user can certainly use explode() to take it apart. I'm not
> > against giving him that answer, it was just a quick patch to write...
> >
> > Is that a -1 then?
>
> Yup, -1 from me.
>
I disagree with this, the current behaviour is imho wrong.
mailto: is a url, rejecting the patch because it introduces a special case,
is not a good thing. parse_url() is for _all_ url's, not just http://
url's,
and besides, the current syntax for mailto is completely valid, and should
be parsed anyway.
(ie, a special case shouldn't be required if the url parser was rfc compliant).
-Sterling
> >
> > > I am not so sure that adding special cases for things like mailto:
> > > and
> > > so on is a good idea. The code works identically to how it worked in
> > > 4.2.3 and prior.
> > >
> > > Ilia
> > >
> > > On November 27, 2002 04:19 pm, Sara "Pollita" Golemon wrote:
> > >> While waiting for opinions on Bug#20460 I went ahead and addressed
> > >> #20308.
> > >>
> > >> User complains that parse_url returns the full email address in 'path'
> > >> element. Makes reference to documents which claim it should return
> > >> 'user' and 'host' element.
> > >>
> > >> To address this request and maintain backward compatability I wrote a
> > >> patch to split the 'path' element in to 'host' and
> > >> 'user' elements
> > >> then return all three.
> > >>
> > >> Ex:
> > >> *current behavior*
> > >>
> > >> print_r(parse_url("mailto:pollita@php.net"));
> > >> Array (
> > >> [scheme] => mailto
> > >> [path] => pollita@php.net
> > >> }
> > >>
> > >> *new behavior*
> > >>
> > >> print_r(parse_url("mailto:pollita@php.net"));
> > >> Array (
> > >> [scheme] => mailto
> > >> [path] => pollita@php.net
> > >> [user] => pollita
> > >> [host] => php.net
> > >> }
> > >>
> > >> If there are no objections I'll commit this change.
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>