From: merch-redmine@... Date: 2019-08-25T18:05:21+00:00 Subject: [ruby-core:94545] [Ruby master Bug#13171] URI::FTP path has a trailing slash when just hostname and scheme provided Issue #13171 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Rejected This doesn't appear to be a bug, even if the behavior is slightly inconsistent between URI::HTTP and URI::FTP. If you can show an actual problem caused by the inconsistency, please reply. ---------------------------------------- Bug #13171: URI::FTP path has a trailing slash when just hostname and scheme provided https://bugs.ruby-lang.org/issues/13171#change-80985 * Author: miloprice (Milo Price) * Status: Rejected * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- As with HTTP uris, the trailing slash on a FTP uri should be optional, per RFC 1738 (ftp://ftp.funet.fi/pub/doc/rfc/rfc1738.txt). However, under the current implementation, URI::FTP#to_s always has a trailing slash when only a hostname is provided (i.e., no path): ~~~ ruby URI.parse("http://example.com").to_s => "http://example.com" URI.parse("ftp://example.com").to_s => "ftp://example.com/" ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: