Project

General

Profile

Actions

Bug #13171

closed

URI::FTP path has a trailing slash when just hostname and scheme provided

Added by miloprice (Milo Price) about 7 years ago. Updated over 4 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:79315]

Description

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):

URI.parse("http://example.com").to_s
=> "http://example.com"
URI.parse("ftp://example.com").to_s
=> "ftp://example.com/"
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0