ちゃっぴの監禁部屋

ガチガチに締めすぎて動きがとれなくなる。。。

ホーム 連絡をする 同期する ( RSS 2.0 ) Login
投稿数  292  : 記事  5  : コメント  634  : トラックバック  78

ニュース

あわせて読みたい

記事カテゴリ

書庫

日記カテゴリ

Communities

ネタ元: URL の hostname 末尾に "." を付けると。。。

Domain name の仕様どうなっているか?ちょっと調査してみる。

とりあえず、今回は URI で使われる仕様が知りたかったので RFC 3986 から。

「3.2.2. Host」 の section に下記のように書かれています。

The rightmost domain label of a fully qualified domain name in DNS may be followed by a single "." and should be if it is necessary to distinguish between the complete domain name and some local domain.

FQDN の一番右端の "." は完全 domain と local domain を区別するために付ける。(ちょー意訳)

なお、その前の行で参照しろと書いてある RFC 1034 「3.1. Name space specifications and terminology」にもちゃんと書いてはありますね。

When a user needs to type a domain name, the length of each label is omitted and the labels are separated by dots ("."). Since a complete domain name ends with the root label, this leads to a printed form which ends in a dot.

"." で区切られる label は省略可能で、domain name の最後の "." は完全修飾 domain name (FQDN) を表すと。

ただ、「3.5. Preferred name syntax」 では domain name は下記のように定義されています。

<DOMAIN> ::= <SUBDOMAIN> | " " <SUBDOMAIN> ::= <LABEL> | <SUBDOMAIN> "." <LABEL> <LABEL> ::= <LETTER> [ [ <LDH-STR> ] <LET-DIG> ] <LDH-STR> ::= <LET-DIG-HYP> | <LET-DIG-HYP> <LDH-STR> <LET-DIG-HYP> ::= <LET-DIG> | "-" <LET-DIG> ::= <LETTER> | <DIGIT> <LETTER> ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case <DIGIT> ::= any one of the ten digits 0 through 9

最後の "." についてふれられていないですね。できれば、直して欲しいな~。

どちらにしろ、最後の "." を誤って解釈するのは Web server の問題だと思います。仕様違反だなこりゃ。

投稿日時 : 2008年5月25日 18:34

コメント

# re: Domain name syntax 2008/05/25 20:07 凪瀬
うーわー。知らなかったー。恥ずかしいー(///)

# re: Domain name syntax 2008/06/03 15:38 ちゃっぴ
これ、よく考えたら URL みて振り分け先かえるところの問題だな。
"/" 以前完全一致で判断させちゃっているんじゃない?

Post Feedback

タイトル
名前
Url:
コメント