addressable icon indicating copy to clipboard operation
addressable copied to clipboard

Template#extract does not properly handle non-list expansion

Open therabidbanana opened this issue 10 years ago • 1 comments

template = Addressable::Template.new("http://{host}{/segments}/{?one,two,bogus}{#fragment}")
template.extract("http://example.com/a,b,c/?one=1&two=2#foo")
# => nil, should be a match

therabidbanana avatar Feb 11 '15 05:02 therabidbanana

Match result should be:

{
"host" => "example.com"
"segments" => ["a", "b", "c"],
"one" => "1",
"two" => "2",
"bogus" => nil,
"fragment" => "foo"
}

adstage-david avatar Feb 11 '15 05:02 adstage-david