ruby / uri

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

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

Closed jeremyevans closed 7 months ago

jeremyevans commented 10 months 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]