Bug #4476

[PATCH] URI('http://hoge/b/').route_to('http://hoge/b') wrongly returns './'

Added by knu (Akinori MUSHA) about 1 year ago. Updated about 1 year ago.

[ruby-core:35444]
Status:Closed Start date:03/07/2011
Priority:Normal Due date:
Assignee:akira (akira yamada) % Done:

0%

Category:lib
Target version:-
ruby -v:ruby 1.9.3dev (2011-03-03 trunk 31011) [x86_64-freebsd8]

Description

When it should be '../b'.

I revamped URI::Generic#route_from_path so that (trailing) slashes are properly and explicitly handled. Please review the attached patch.

0001-lib-uri-generic.rb-route_from_path-Fix-a-bug-in-rela.patch (3.1 kB) knu (Akinori MUSHA), 03/07/2011 05:49 pm

Associated revisions

Revision 31288
Added by knu (Akinori MUSHA) about 1 year ago

* lib/uri/generic.rb (#route_from_path): Fix a bug where URI('http://h/b/').route_to('http://h/b') wrongly returned './' (should be '../b'). [Bug #4476]

Revision 31288
Added by knu (Akinori MUSHA) about 1 year ago

* lib/uri/generic.rb (#route_from_path): Fix a bug where URI('http://h/b/').route_to('http://h/b') wrongly returned './' (should be '../b'). [Bug #4476]

History

Updated by knu (Akinori MUSHA) about 1 year ago

  • Status changed from Open to Assigned
  • Assignee set to akira (akira yamada)

Updated by akira (akira yamada) about 1 year ago

I confirmed. Could you please commit your patch?

Updated by knu (Akinori MUSHA) about 1 year ago

  • Status changed from Assigned to Closed

Also available in: Atom PDF