ruby / uri

URI is a module providing classes to handle Uniform Resource Identifiers
https://ruby.github.io/uri/
Other
85 stars 46 forks source link

Make URI#to_s prepend relative path with / if there is a host or port #90

Closed jeremyevans closed 10 months ago

jeremyevans commented 1 year ago

Otherwise, the path could be considered part of the host or port.

This is better than modifying the path to make it absolute when a host or port is set. We could also raise for invalid paths when a host or port is set using check_path, but that results in weird errors, and won't catch issues (such as ftp allowing a relative path).

Fixes [Bug #19916]