[#78949] [Ruby trunk Feature#13095] [PATCH] io.c (rb_f_syscall): remove deprecation notice — kosaki.motohiro@...
Issue #13095 has been updated by Motohiro KOSAKI.
3 messages
2017/01/03
[#78997] [Ruby trunk Bug#13110] Byte-based operations for String — shugo@...
Issue #13110 has been updated by Shugo Maeda.
3 messages
2017/01/06
[#79228] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150] — Eric Wong <normalperson@...>
naruse@ruby-lang.org wrote:
5 messages
2017/01/23
[#79511] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150]
— Eric Wong <normalperson@...>
2017/02/13
Eric Wong <normalperson@yhbt.net> wrote:
[#79518] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150]
— Nobuyoshi Nakada <nobu@...>
2017/02/13
On 2017/02/13 10:04, Eric Wong wrote:
[#79298] [Ruby trunk Bug#13085][Assigned] io.c io_fwrite creates garbage — nobu@...
Issue #13085 has been updated by Nobuyoshi Nakada.
3 messages
2017/01/29
[#79337] Re: [ruby-changes:45397] normal:r57469 (trunk): io.c: recycle garbage on write — SASADA Koichi <ko1@...>
Eric:
4 messages
2017/01/31
[#79352] Re: [ruby-changes:45397] normal:r57469 (trunk): io.c: recycle garbage on write
— Eric Wong <normalperson@...>
2017/01/31
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:79317] [Ruby trunk Bug#13171] URI::FTP path has a trailing slash when just hostname and scheme provided
From:
matthew@...
Date:
2017-01-31 01:02:57 UTC
List:
ruby-core #79317
Issue #13171 has been updated by Matthew Kerwin.
Comments about RFC 1738 being "obsolete" notwithstanding, the slash between host/port and url-path is optional when the url-path is empty. Specifically, there is no prohibition on including it.
Section 3.1 ("Common Internet Scheme Syntax"):
> Some or all of the parts "\<user>:\<password>@", ":\<password>",
> ":\<port>", and "/\<url-path>" may be excluded.
and:
> url-path
>> The rest of the locator consists of data specific to the
>> scheme, and is known as the "url-path". It supplies the
>> details of how the specified resource can be accessed. Note
>> that the "/" between the host (or port) and the url-path is
>> NOT part of the url-path.
Section 3.2.2. ("FTP url-path"):
> The url-path of a FTP URL has the following syntax:
>
>~~~
> <cwd1>/<cwd2>/.../<cwdN>/<name>;type=<typecode>
>~~~
So according to the text the slash is purely presentational and has no bearing on the path of the URL. This is reflected in the documentation for [URI::File#path](http://ruby-doc.org/stdlib-2.4.0/libdoc/uri/rdoc/URI/FTP.html#method-i-path)
Also please note the specification of how to interpret the path elements *after* that initial slash: https://tools.ietf.org/html/rfc1738#section-3.2.2
Cheers
----------------------------------------
Bug #13171: URI::FTP path has a trailing slash when just hostname and scheme provided
https://bugs.ruby-lang.org/issues/13171#change-62727
* Author: Milo Price
* Status: Open
* 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: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>