Project

General

Profile

Actions

Bug #1466

closed

URI#parse fails on some working urls

Added by BioNuc (Osama brekaa) over 15 years ago. Updated over 13 years ago.

Status:
Rejected
Assignee:
-
ruby -v:
1.8.7
[ruby-core:23443]

Description

=begin
i tried this snippet of code

require 'uri'
URI.parse('http://192.168.0.88:8080/mondrian/mdxquery?queryString=select%0D%0A++{[Measures].[Score]%2C+[Measures].[Happy+Count]}+on+columns%2C%0D%0A++NON+EMPTY+[Time].[Month].MEMBERS+on+rows%0D%0Afrom%0D%0A++[FeelingsSummary]%0D%0Awhere%0D%0A++([UserId].[222]%2C+[TimeSlicer].[2008])')

i don't know why it fails
although this url is a working one. i tried it on my browser and works fine
Also tried it on mechanize and worked

the exception was that one

from /usr/lib/ruby/1.8/uri/common.rb:436:in split' from /usr/lib/ruby/1.8/uri/common.rb:485:in parse'
from (irb):7

i think this is a bug
=end

Actions #1

Updated by daniel (Daniel Cavanagh) over 15 years ago

=begin
[ ] are at least a problem. i ran into this a little while ago

according to http://www.ietf.org/rfc/rfc2732.txt, [ ] are used to define
an ipv6 address and are thus reserved. and as the rfc shows, they where
originally part of the 'unwise' set of characters that are supposed to be
always encoded so as to not cause problems (with gateways and other broken
things)

try encoding [ ] (%5B and %5D) to see if it fixes the problem. ( ) might be
too, but that's just a guess. i'm too lazy to recheck :)
=end

Actions #2

Updated by naruse (Yui NARUSE) over 15 years ago

  • Status changed from Open to Rejected

=begin
[] is not allowed for URI.
escape them.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0