<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><figure class="important"><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986</anchor> は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">IETF</anchor> の手続き上は現行の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">インターネット標準</anchor>ですが、
事実上 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URL Standard</anchor> により廃止されています。</p></figure><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="12" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[12]</anchor-end> <cite xml:lang="en">RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax</cite> (<time>2014-07-10 23:48:29 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc3986">http://tools.ietf.org/html/rfc3986</anchor-external></li></ul></refs><section><h1>RFC</h1><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> </figcaption><p><strong>Uniform Resource Identifier (URI): Generic Syntax</strong><ul><li>Network Working Group                                   </li><li>Request for Comments: 3986                                   </li><li>STD: 66                                                </li><li>Updates: 1738                                            </li><li>Obsoletes: 2732, 2396, 1808                              </li><li>Category: Standards Track                    </li><li>T. Berners-Lee</li><li>W3C/MIT</li><li>R. Fielding</li><li>Day Software</li><li>L. Masinter</li><li>Adobe Systems</li><li>January 2005</li></ul></p><section><h1>Status of This Memo</h1><blockquote><p>This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements.  Please refer to the current edition of the &quot;Internet
Official Protocol Standards&quot; (STD 1) for the standardization state
and status of this protocol.  Distribution of this memo is unlimited.</p></blockquote></section><section><h1>Copyright Notice</h1><blockquote><p>Copyright (C) The Internet Society (2005).</p></blockquote></section><section><h1>Abstract</h1><blockquote><p>A Uniform Resource Identifier (URI) is a compact sequence of
characters that identifies an abstract or physical resource.  This
specification defines the generic URI syntax and a process for
resolving URI references that might be in relative form, along with
guidelines and security considerations for the use of URIs on the
Internet.  The URI syntax defines a grammar that is a superset of all
valid URIs, allowing an implementation to parse the common components
of a URI reference without knowing the scheme-specific requirements
of every possible identifier.  This specification does not define a
generative grammar for URIs; that task is performed by the individual
specifications of each URI scheme.</p></blockquote><p>統一資源識別子 (URI) は抽象的資源や物理的資源を識別する簡潔な文字列です。
この仕様書は一般 URI 構文と相対形かもしれない URI 参照を解決する処理をインターネットにおける
URI の使用についての指針と安全に関しての考察と共に定義します。
URI 構文はすべての妥当な URI の超集合である文法を定義しています。
これによって実装はすべての可能な識別子の scheme 規定の要件を知らずとも
URI 参照を共通な部品に構文解析することができます。
この仕様書は URI の生成的な文法は定義しません。
それは個々の URI scheme の仕様において行う仕事です。</p></section><section><h1>Table of Contents</h1><blockquote><pre>   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  4
       1.1.  Overview of URIs . . . . . . . . . . . . . . . . . . . .  4
             1.1.1.  Generic Syntax . . . . . . . . . . . . . . . . .  6
             1.1.2.  Examples . . . . . . . . . . . . . . . . . . . .  7
             1.1.3.  URI, URL, and URN  . . . . . . . . . . . . . . .  7
       1.2.  Design Considerations  . . . . . . . . . . . . . . . . .  8
             1.2.1.  Transcription  . . . . . . . . . . . . . . . . .  8
             1.2.2.  Separating Identification from Interaction . . .  9
             1.2.3.  Hierarchical Identifiers . . . . . . . . . . . . 10
       1.3.  Syntax Notation  . . . . . . . . . . . . . . . . . . . . 11
   2.  Characters . . . . . . . . . . . . . . . . . . . . . . . . . . 11
       2.1.  Percent-Encoding . . . . . . . . . . . . . . . . . . . . 12
       2.2.  Reserved Characters  . . . . . . . . . . . . . . . . . . 12
       2.3.  Unreserved Characters  . . . . . . . . . . . . . . . . . 13
       2.4.  When to Encode or Decode . . . . . . . . . . . . . . . . 14
       2.5.  Identifying Data . . . . . . . . . . . . . . . . . . . . 14
   3.  Syntax Components  . . . . . . . . . . . . . . . . . . . . . . 16
       3.1.  Scheme . . . . . . . . . . . . . . . . . . . . . . . . . 17
       3.2.  Authority  . . . . . . . . . . . . . . . . . . . . . . . 17
             3.2.1.  User Information . . . . . . . . . . . . . . . . 18
             3.2.2.  Host . . . . . . . . . . . . . . . . . . . . . . 18
             3.2.3.  Port . . . . . . . . . . . . . . . . . . . . . . 22
       3.3.  Path . . . . . . . . . . . . . . . . . . . . . . . . . . 22
       3.4.  Query  . . . . . . . . . . . . . . . . . . . . . . . . . 23
       3.5.  Fragment . . . . . . . . . . . . . . . . . . . . . . . . 24
   4.  Usage  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
       4.1.  URI Reference  . . . . . . . . . . . . . . . . . . . . . 25
       4.2.  Relative Reference . . . . . . . . . . . . . . . . . . . 26
       4.3.  Absolute URI . . . . . . . . . . . . . . . . . . . . . . 27
       4.4.  Same-Document Reference  . . . . . . . . . . . . . . . . 27
       4.5.  Suffix Reference . . . . . . . . . . . . . . . . . . . . 27
   5.  Reference Resolution . . . . . . . . . . . . . . . . . . . . . 28
       5.1.  Establishing a Base URI  . . . . . . . . . . . . . . . . 28
             5.1.1.  Base URI Embedded in Content . . . . . . . . . . 29
             5.1.2.  Base URI from the Encapsulating Entity . . . . . 29
             5.1.3.  Base URI from the Retrieval URI  . . . . . . . . 30
             5.1.4.  Default Base URI . . . . . . . . . . . . . . . . 30
       5.2.  Relative Resolution  . . . . . . . . . . . . . . . . . . 30
             5.2.1.  Pre-parse the Base URI . . . . . . . . . . . . . 31
             5.2.2.  Transform References . . . . . . . . . . . . . . 31
             5.2.3.  Merge Paths  . . . . . . . . . . . . . . . . . . 32
             5.2.4.  Remove Dot Segments  . . . . . . . . . . . . . . 33
       5.3.  Component Recomposition  . . . . . . . . . . . . . . . . 35
       5.4.  Reference Resolution Examples  . . . . . . . . . . . . . 35
             5.4.1.  Normal Examples  . . . . . . . . . . . . . . . . 36
             5.4.2.  Abnormal Examples  . . . . . . . . . . . . . . . 36
   6.  Normalization and Comparison . . . . . . . . . . . . . . . . . 38
       6.1.  Equivalence  . . . . . . . . . . . . . . . . . . . . . . 38
       6.2.  Comparison Ladder  . . . . . . . . . . . . . . . . . . . 39
             6.2.1.  Simple String Comparison . . . . . . . . . . . . 39
             6.2.2.  Syntax-Based Normalization . . . . . . . . . . . 40
             6.2.3.  Scheme-Based Normalization . . . . . . . . . . . 41
             6.2.4.  Protocol-Based Normalization . . . . . . . . . . 42
   7.  Security Considerations  . . . . . . . . . . . . . . . . . . . 43
       7.1.  Reliability and Consistency  . . . . . . . . . . . . . . 43
       7.2.  Malicious Construction . . . . . . . . . . . . . . . . . 43
       7.3.  Back-End Transcoding . . . . . . . . . . . . . . . . . . 44
       7.4.  Rare IP Address Formats  . . . . . . . . . . . . . . . . 45
       7.5.  Sensitive Information  . . . . . . . . . . . . . . . . . 45
       7.6.  Semantic Attacks . . . . . . . . . . . . . . . . . . . . 45
   8.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 46
   9.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 46
   10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 46
       10.1. Normative References . . . . . . . . . . . . . . . . . . 46
       10.2. Informative References . . . . . . . . . . . . . . . . . 47
   A.  Collected ABNF for URI . . . . . . . . . . . . . . . . . . . . 49
   B.  Parsing a URI Reference with a Regular Expression  . . . . . . 50
   C.  Delimiting a URI in Context  . . . . . . . . . . . . . . . . . 51
   D.  Changes from RFC 2396  . . . . . . . . . . . . . . . . . . . . 53
       D.1.  Additions  . . . . . . . . . . . . . . . . . . . . . . . 53
       D.2.  Modifications  . . . . . . . . . . . . . . . . . . . . . 53
   Index  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 60
   Full Copyright Statement . . . . . . . . . . . . . . . . . . . . . 61</pre></blockquote></section></figure></section><section><h1>仕様書の構成</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986</anchor> は次の各章で構成されていました。</p><dl><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//1</anchor>. はじめに</dt><dd>URI の概要と、仕様書内の基本用語が説明されています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//2</anchor>. 文字</dt><dd>URI における文字の使用について説明しています。
予約文字・非予約文字の説明や百分率符号化の説明はここに含まれています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//3</anchor>. 構文部品</dt><dd>URI の5大部品 (scheme, 命名権者, 経路, 照会, 素片)
について説明しています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//4</anchor>. 用法</dt><dd>他の規格等でよく使われる URI を参照する形式が定義されています。
URI 参照, 相対参照, 絶対 URI, 同文書参照の定義はここに含まれています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//5</anchor>. 参照解決</dt><dd>相対参照を解決して URI を得る方法が説明されています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//6</anchor>. 正規化と比較</dt><dd>URI の同値性を決定するための様々な方法が説明されています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//7</anchor>. 安全性に関して</dt><dd>URI を使用するにあたっての主要な安全上の問題が説明されています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//8</anchor>. IANA に関して</dt><dd>IANA とこの仕様の関係について説明しています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//9</anchor>. 謝辞</dt><dd>この仕様の制定にあたっての謝辞が記述されています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//10</anchor>. 参考文献</dt><dd>引用規格と参考となる文献が記述されています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//A</anchor>. URI の ABNF 集成</dt><dd>URI の構文規則がすべて集められています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//B</anchor>. 正規表現による URI 参照の構文解析</dt><dd>URI 参照を構文解析するための正規表現の例が記載されています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//C</anchor>. 文脈で URI を区切る</dt><dd>普通の文章中で URI を記述するための方法が説明されています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//D</anchor>. RFC 2396 からの変更点</dt><dd>前の版の仕様書との主要な変更点が説明されています。</dd><dt><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 3986//E</anchor></dt><dd>索引、著者の連絡先、完全な著作権声明、知的所有権に関して、
RFC 編集者からの謝辞が含まれています。</dd></dl></section><section><h1>メモ</h1><figure class="amazon"><p>Web 開発</p></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> <cite>RFC Errata Report</cite>
( (<time>2011-03-05 15:52:41 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.rfc-editor.org/errata_search.php?rfc=3986">http://www.rfc-editor.org/errata_search.php?rfc=3986</anchor-external></p></section></body></html>