Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: Is it a bug of URI lib?
Alex Young
7/30/2007 11:45:00 AM
nan wu wrote:
> I use the URI.merge method, and I met something incorrect. It is a bug of
> URI lib?
>
> For example:
>
> require 'uri'
>
> site_url = '
http://www.try.com/test...
> cur_url ='?page=2'
>
> site=URI.parse(site_url)
>
> cur=URI.parse(cur_url)
>
> p farther.merge(cur)
>
> The result:
>
> #<URI::HTTP:0x15bc060 URL:
http://www.try.com/?page=2<http://www.try.com/?...
>
> But what I want is:
>
> *
http://www.try.com/test.a...
*
>
> So I think this is a bug,because the ?page=2 is legal relative url in html.
>
It's legal under RFC 3986, but not under RFC 2396, as far as I know.
The URI library is written to conform to the latter. There was a
suggestion a little while ago to update it, but I don't know that
anything came of it. If I had the time I'd do it myself, but I'm under
the gun at the moment.
--
Alex
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Is it a bug of URI lib?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password