Forum: Ruby Is it a bug of URI lib?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
nan wu (Guest)
on 2007-07-30 15:39
(Received via mailing list)
I use the URI.merge method, and I met something incorrect. It is a bug
URI lib?

For example:

require 'uri'

site_url = ''
cur_url ='?page=2'



p farther.merge(cur)

The result:


But what I want is:


So I think this is a bug,because the ?page=2 is legal relative url in
Alex Y. (Guest)
on 2007-07-30 15:47
(Received via mailing list)
nan wu wrote:
> site=URI.parse(site_url)
> **
> 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.
nan wu (Guest)
on 2007-07-30 15:57
(Received via mailing list)
Maybe I should report it to the Akira Yamada the original author of URI
The URI lib should be updated since we will meet many cases like that
RFC 3986.

I have checked the source codes of URI lib. I found it completely follow
RFC 2396.

2007/7/30, Alex Y. <removed_email_address@domain.invalid>:
This topic is locked and can not be replied to.