1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00
freebsd-ports/lang/ruby19/files/patch-lib_uri_generic.rb
Stanislav Sedov 1c15187aab - Fix the bug in URI module that smashed uri paths in merge method for
ftp uris.

PR:		ports/131775
Reported by:	Helmut Schneider <jumper99@gmx.de>
2009-06-18 13:01:02 +00:00

20 lines
488 B
Ruby

--- lib/uri/generic.rb.orig 2009-06-18 16:47:45.000000000 +0400
+++ lib/uri/generic.rb 2009-06-18 16:48:54.000000000 +0400
@@ -1032,7 +1032,15 @@
end
end
- str << path_query
+ path = path_query
+
+ #
+ # Add URI delimiter if the path misses it (like as in FTP)
+ #
+ if not path.empty? and not str.empty? and path[0, 1] != '/'
+ path = '/' + path
+ end
+ str << path
end
if @fragment