-
Notifications
You must be signed in to change notification settings - Fork 4
/
935.txt
141 lines (102 loc) · 7.59 KB
/
935.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
* 仕様書
[REFS[
- [23] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-02-14 16:33:19 +09:00]] 版) <https://html.spec.whatwg.org/#parse-a-url>
]REFS]
* IRI の相対参照解決
[3] [[RIF]] は [[RFC 3986]] の[[算法]]を [[IRI]] に直接適用すると規定しています。
;; [CITE[RIF Datatypes and Built-Ins 1.0]] ([TIME[2010-06-22 23:52:50 +09:00]] 版) <http://www.w3.org/TR/2010/REC-rif-dtb-20100622/#Relative_IRIs>
[4] [[SSML 1.1]] の「[[URI]]」は [CODE(XML)@en[[[anyURI]]]] ですが、
[[RFC 3986]] の[[算法]]を (特に断り書きなしに) 適用すると規定しています。
;;[CITE@en[Speech Synthesis Markup Language (SSML) Version 1.1]] ([TIME[2010-09-08 00:26:19 +09:00]] 版) <http://www.w3.org/TR/2010/REC-speech-synthesis11-20100907/#S3.1.3.1>
* Open Packaging の相対参照解決
[2] [[Open Packaging]] は [[Unicode文字列]]を[[部分名]]に[[解決]]する方法を規定しています ([[ECMA 376]]
第2部附属書A)。[[部分名]]とは、 [[pack URI]] の [[path]] 部分のことです。
この[[解決]]は [[Unicode文字列]] → [[IRI]] → [[URI]] → [[部分名]]の3段階に分かれています。
最初の2つの段階については「[[IRI]]」の項を参照してください。
最後の [[URI]] → [[部分名]]の段階では、[[相対参照]]の[[解決]]が行われます
(同、 A.3)。
この[[解決]]の方法は [[RFC 3986]] の[[相対参照]]の[[解決]]よりも拡張されたものになっています。
= [CODE(char)[[['''[''']]]] と [CODE(char)[[[''']''']]]] を[[百分率符号化]]します
= [CODE(char)[[[%]]]] の後に[[十六進数]]2桁が続かない場合、[[百分率符号化]]します
= [[非予約文字]] ([[RFC 3986]] のもの?) に対する[[百分率符号化]]を[[復号]]します
= [CODE(char)[[[/]]]] と [CODE(char)[[[\]]]] の[[百分率符号化]]を[[復号]]します
= [CODE(char)[[[\]]]] を [CODE(char)[[[/]]]] に変換します
= [CODE(char)[[[.]]]] 以外の[[文字]]を含んだ [[segment]]
それぞれについて、末尾に [CODE(char)[[[.]]]] があればすべて除去します
= [CODE(char)[[[/]]]] の連続を1つの [CODE(char)[[[/]]]] に置き換えます
= 末尾に1つ [CODE(char)[[[/]]]] があれば、除去します
= 3つ[[以上]]の [CODE(char)[[[.]]]] から成る [[segment]] 全体を除去します
= [[RFC 3986]] の方法で[[相対参照]]として[[解決]]し、得られた [[path]] の部分が[[部分名]]です
* モジュール指定子の解決
[25] [[モジュール指定子]]参照。
* 素片識別子の扱い
[1] 基底 [SAMP(URI)[http://foo.example/#bar]] で相対 URI 参照 [SAMP(URI)[?]] を解決すると [SAMP(URI)[http://foo.example/?]] になる実装と [SAMP(URI)[http://foo.example/?#bar]] になる実装がある。
* メモ
[5] [CITE@EN[XQuery 3.0: An XML Query Language]]
( ([TIME[2014-04-08 08:26:21 +09:00]] 版))
<http://www.w3.org/TR/xquery-30/#id-resolve-relative-uri>
[6] [CITE@EN[XML Path Language (XPath) 3.0]]
( ([TIME[2014-04-08 07:58:50 +09:00]] 版))
<http://www.w3.org/TR/xpath-30/#dt-resolve-relative-uri>
[7] [CITE@EN[XPath and XQuery Functions and Operators 3.0]]
( ([TIME[2014-04-08 07:02:07 +09:00]] 版))
<http://www.w3.org/TR/xpath-functions-3/#func-resolve-uri>
[8] [CITE@en[Canonical XML Version 2.0]]
( ([TIME[2010-09-02 01:31:32 +09:00]] 版))
<http://www.w3.org/TR/2010/WD-xml-c14n2-20100831/>
[9] [CITE@EN[XQuery 1.0 and XPath 2.0 Functions and Operators (Second Edition)]]
( ([TIME[2010-12-17 00:06:54 +09:00]] 版))
<http://www.w3.org/TR/2010/REC-xpath-functions-20101214/#func-resolve-uri>
[10] [CITE@EN[SPARQL 1.1 Query Language]]
( ([TIME[2013-03-21 20:27:53 +09:00]] 版))
<http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#relIRIs>
[11] [CITE@en[Live URL Resolution Viewer]] ([CODE[2008-07-05 22:53:22 +09:00]] 版) <http://suika.fam.cx/www/url/urlresolution>
[12] [CITE@ja[冬様もすなる☆日記というもの (2008年7月)]] ([[わかば]] 著, [TIME[2008-07-06 00:10:37 +09:00]] 版) <http://suika.fam.cx/~wakaba/d/d200807#d6-1>
[13] [CITE[OASIS Open Document Format for Office Applications (OpenDocument) Version 1.2 - Part 3: Packages]]
([TIME[2011-09-29 13:00:00 +09:00]] 版)
<http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part3.html#a3_7Usage_of_IRIs_Within_Packages>
[14] [CITE@en[Support fragments as long as base URL is non-null. Fixes https://www.… · whatwg/url@7468c39]]
([TIME[2015-06-16 15:10:06 +09:00]] 版)
<https://github.com/whatwg/url/commit/7468c397f600b72f650f52fc02466f051bf96ad3>
[15] [CITE@en[Fix fragment against no relative scheme base URL again. · whatwg/url@7f5036c]]
([TIME[2015-06-17 16:53:02 +09:00]] 版)
<https://github.com/whatwg/url/commit/7f5036c15e1f09ec37c850bbec5f3bedc418a451>
[16] [CITE@en[Support relative URLs for unknown schemes. Please review! Fixes https… · whatwg/url@b266a43]]
([TIME[2015-06-18 19:12:49 +09:00]] 版)
<https://github.com/whatwg/url/commit/b266a43fc9df0e8607074bd4d336a517e2010009>
[17] [CITE@en[Remove the "element's base URL" indirection · whatwg/html@199c0c0]]
([TIME[2015-12-19 11:03:40 +09:00]] 版)
<https://github.com/whatwg/html/commit/199c0c0569bc0e312bb70bffa8ef2f85231f4cd1>
[18] [CITE@en[Clarify callers of the 'resolve a URL' algorithm · whatwg/html@7c2db6f]]
([TIME[2016-01-09 12:07:04 +09:00]] 版)
<https://github.com/whatwg/html/commit/7c2db6f8c24f8c20fa362ee49433de966330a1fe>
[19] [CITE@en[Fix #77: always decode "%2e" in a URL's path · whatwg/url@bee5ad8]]
([TIME[2016-01-15 18:56:12 +09:00]] 版)
<https://github.com/whatwg/url/commit/bee5ad8041adfe6fc676c527bbc3f3cf4562ef67>
[20] [CITE@en[Drop dependencies on Encoding Standard's decoder concept · whatwg/url@37f9329]]
([TIME[2016-02-11 12:01:12 +09:00]] 版)
<https://github.com/whatwg/url/commit/37f932928378c0df521034cfd223f4ba603ef476>
[21] [CITE@en[Use the "get an output encoding" from the Encoding Standard · whatwg/url@a9197f7]]
([TIME[2016-02-11 12:03:32 +09:00]] 版)
<https://github.com/whatwg/url/commit/a9197f7714e6b125f1f760ca1aa661530261773c>
[22] [CITE@en[Update integration with Encoding Standard · whatwg/html@6a31c26]]
([TIME[2016-02-14 18:45:01 +09:00]] 版)
<https://github.com/whatwg/html/commit/6a31c26cf12e39dab1a488e75dd56c03d6786d39>
[24] [CITE@en[URLs are parsed and produce records · whatwg/html@30bc255]]
([TIME[2016-02-14 22:49:31 +09:00]] 版)
<https://github.com/whatwg/html/commit/30bc2557105ad62881ec9670f253febbc9761b44>
[26] [CITE@en[Fix #823: Don't strip characters from the URL in meta refresh · whatwg/html@543d8c1]]
([TIME[2016-03-08 18:30:02 +09:00]] 版)
<https://github.com/whatwg/html/commit/543d8c1598bf5bff0b8febc50dff11dcb42f8768>
[27] [CITE@en[Fix #101: always strip U+0009, U+000A, and U+000D · whatwg/url@7b40216]]
([TIME[2016-03-08 18:33:29 +09:00]] 版)
<https://github.com/whatwg/url/commit/7b40216f809c7fe3c9a1680b5c1b06a771c9ebd8>
[28] [CITE@en[Stop after setting an url’s query to null · whatwg/url@4f1c2dd]]
([TIME[2016-04-15 17:42:12 +09:00]] 版)
<https://github.com/whatwg/url/commit/4f1c2ddbdb866b1150819622ec04a86813294059>
[29] [CITE@en[curl handling of HTTP 301 redirection fails when response location header starts with http:///<domain> (3 slashes between protocol and domain)) · Issue #791 · curl/curl]]
( ([TIME[2016-05-10 20:23:27 +09:00]]))
<https://github.com/curl/curl/issues/791>
[30] [CITE@en[Issue 385645 - chromium - Security: Multiple leading slashes in URLs may confuse some server-side XSS filters - Monorail]]
( ([TIME[2016-05-10 20:26:39 +09:00]]))
<https://bugs.chromium.org/p/chromium/issues/detail?id=385645>