[#42196] YAML でEUC は使えないのでしょうか。 — Tomokiyo Nomura <tnomura@...>
野村@延岡です。
8 messages
2006/05/05
[#42214] [ANN] RubyKaigi 2006 Announcement — SASADA Koichi <ko1@...>
日本Rubyの会、日本Rubyカンファレンス2006実行委員のささだです。
4 messages
2006/05/10
[#42235] ftp:// のリストを open-uri で得られないでしょうか — "Hideo Konami" <konami@...>
小波です。
5 messages
2006/05/20
[#42243] コミュニティと宗教の分離について — Beyond <beyond@...>
14 messages
2006/05/21
[#42245] Re: コミュニティと宗教の分離について
— Masayoshi Takahashi <takahashi@...>
2006/05/22
高橋征義です。「日本Rubyの会」という集まりの代表をしております。
[#42253] File objectがいつのまにか nilに、 — しん <dezawa@...>
出沢です
9 messages
2006/05/23
[#42267] メニューのループについて — リックス <rubyer4649@...>
りっくすです
21 messages
2006/05/27
[#42275] Re: メニューのループについて
— rubikitch <rubikitch@...>
2006/05/27
From: リックス <rubyer4649@yahoo.co.jp>
[#42276] Re: メニューのループについて
— Hiroshi Yuki <hyuki@...>
2006/05/27
結城です。
[#42301] Re: メニューのループについて — "conundrum /" <conundrum@...>
conundrumです。
11 messages
2006/05/28
[#42306] Re: メニューのループについて
— rubikitch <rubikitch@...>
2006/05/29
From: "conundrum /" <conundrum@hotmail.co.jp>
[ruby-list:42215] URI relative reference beyond root path
From:
Masao Takaku <masao@...>
Date:
2006-05-13 04:47:52 UTC
List:
ruby-list #42215
はじめまして、たかくと申します。
以下のようなルートパスを踏み越えるような URI の相対パスの展開について、
うかがいたいのですが、
(URI.parse("http://www.example.com/") + "../index.html").to_s
=> "http://www.example.com/../index.html"
これはブラウザ等が、"http://www.example.com/index.html" と解釈する
のと異なる挙動なので、困ることがあります。
すこし調べてみたところ、RFC 3986 では相対パスの展開方法の記述が
変更され、以下のような節が追加になっています:
5.4.2. Abnormal Examples
Although the following abnormal examples are unlikely to occur in
normal practice, all URI parsers should be capable of resolving
them consistently. Each example uses the same base as that
above.
Parsers must be careful in handling cases where there are more
".." segments in a relative-path reference than there are
hierarchical levels in the base URI's path. Note that the ".."
syntax cannot be used to change the authority component of a URI.
"../../../g" = "http://a/g"
"../../../../g" = "http://a/g"
上記仕様に沿えば、最初に示した例は、http://www.example.com/index.html
と展開するので良さそうに見えます。
いかがでしょうか?
ちなみに手元の環境は ruby 1.8.4 (2005-12-24) [i686-linux] です。
よろしくお願いします。
--
高久 雅生 // masao@nii.ac.jp