-
Notifications
You must be signed in to change notification settings - Fork 4
/
39.txt
508 lines (360 loc) · 26.6 KB
/
39.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
[412] [DFN[[[authority]]]] は、[[URL]] のうち、 [[scheme]] と [CODE(URI)[[[:]]]]
の直後の [CODE(URI)@en[[[//]]]] とその後最初の
[CODE(URI)[[[/]]]], [CODE(URI)@en[[[?]]]], [CODE(URI)[[['''#''']]]] または末尾の間にある部分です。
[413] 多くの場合 [[authority]] は[[ドメイン名]]や[[ホスト名]]や [[IPアドレス]] ([[host]]) と、
省略可能な[[利用者名]]や[[合言葉]] ([[userinfo]]) や[[ポート番号]]
([[port]]) を指定することになっています。
* authority の内容
** そもそも使わない
[416] [CODE(URI)@en[[[mailto:]]]], [CODE(URI)@en[[[about:]]]], [CODE(URI)@en[[[tel:]]]]
などではそもそも [[authority]] 部分が存在しません。
** ホスト名
[415] [CODE(URI)@en[[[http:]]]] など多くの [[URL]] では、 [[ホスト名]]を指定します。
直後に[[ポート番号]]、直前に [[userinfo]] を指定することも可能なことが多いです。
** 作業グループ名
[418] [CODE(URI)@en[[[smb:]]]] では[[ホスト名]]、[[SMB]] [[鯖名]]、[[SMB]]
[[作業グループ名]]を指定できます。
** IRC ネットワーク名
[417] [CODE(URI)@en[[[irc:]]]] では[[ホスト名]]の他に [[IRC]]
の[[ネットワーク名]]も指定できます。
** URL のようなもの
[14] [CODE(URI)@en[[[pack:]]]] [[URI scheme]] では、 [[authority]] 部に[[パッケージURI]]
を適当に変換したものを使います。
** ファイル名
[408] [CODE(URI)@en[[[res:]]]] [[URL]] では [[Windows]] の[[ファイル名]]を [[authority]]
として使います。
** パッケージ名など内部構造の名前
[403] [CODE(URI)@en[[[chrome:]]]] ([[Gecko]])、
[CODE(URI)@en[[[chrome-extension:]]]]、[CODE(URI)@en[[[safari-extension:]]]]
では[[拡張機能]]のパッケージ名を [CODE(ABNF)@en[[[authority]]]]
部分に使っています。
[401] [CODE(URI)@en[[[hcp:]]]] や [CODE(URI)@en[[[ms-help:]]]]
では内部的な[[識別子]]を指定するために使います。
[414] [CODE(URI)@en[[[widget:]]]] [[URL]] では [[UUID]] とされています。
[409] [CODE(URI)@en[[[wysisyg:]]]]
[450] [CODE(URI)@en[[[android-app:]]]] はパッケージ名 ([[逆ドメイン名]]) を使っています。
[451] [[逆ドメイン名]]らしきもの
[FIG[
- [CODE(URI)@en[[[appigotodo:]]]]
- [CODE(URI)@en[[[bundleclass:]]]]
]FIG]
** LDAP
[419] [CODE(URI)@en[[[ldap:]]]] の [[Microsoft]] の実装では [[dn]] など [[LDAP]]
における名前と値の組の並びを指定できるようです。
;; [420] [[IETF]] の定義では [[path]] の部分に含めることになっているものです。
** 利用者識別子
[453] 何らかの[[利用者]]を識別するもの ([[ユーザー名]]、[[アカウント]]のIDなど) を使うものもあります。
[FIG[
- [CODE(URI)@en[[[tweetbot:]]]]
- [CODE(URI)@en[[[wpp:]]]]
]FIG]
** x-callback-url
[452] [[x-callback-url]]
** path と変わらない使い方をされるもの
[423] [[URL]] の構造的意味を理解せずに設計された [[URL scheme]] では、しばしば [[authority]]
は単に [[scheme]] の後に [CODE[://]] を続けたためだけに形式的に存在するのみで、
実質的には [[path]] のような使われ方をされています。階層型構造の位置を表していたり、
アプリケーション内の識別子であったり、アプリケーションの動作の指令であったりします。
[EG[
- [CODE(URI)@en[[[amb:]]]]
- [CODE(URI)@en[[[bookpedia:]]]]
- [CODE(URI)@en[[[byword:]]]]
- [CODE(URI)@en[[[callrec:]]]]
- [CODE(URI)@en[[[cartographer:]]]]
- [CODE(URI)@en[[[cdpedia:]]]]
- [CODE(URI)@en[[[cheapcalls:]]]]
- [CODE(URI)@en[[[cloudrop:]]]]
- [CODE(URI)@en[[[cobitools:]]]]
- [CODE(URI)@en[[[dailymotion:]]]]
- [CODE(URI)@en[[[define:]]]]
- [CODE(URI)@en[[[duoxx:]]]]
- [CODE(URI)@en[[[dvdpedia:]]]]
- [CODE(URI)@en[[[editorial]]]]
- [CODE(URI)@en[[[eureka:]]]]
- [CODE(URI)@en[[[fb:]]]]
- [CODE(URI)@en[[[gamepedia:]]]]
- [CODE(URI)@en[[[gcbuddy:]]]]
- [CODE(URI)@en[[[geopherlite:]]]]
- [CODE(URI)@en[[[imagedata:]]]]
- [CODE(URI)@en[[[izorn:]]]]
- [CODE(URI)@en[[[kippster:]]]]
- [CODE(URI)@en[[[launchpro-dropbox:]]]]
- [CODE(URI)@en[[[localch:]]]]
- [424] [CODE(URI)@en[[[mail:]]]]
- [CODE(URI)@en[[[mypraypal:]]]]
- [CODE(URI)@en[[[navigon:]]]]
- [CODE(URI)@en[[[pic2shop:]]]]
- [CODE(URI)@en[[[purecalc:]]]]
- [CODE(URI)@en[[[radarscope:]]]]
- [CODE(URI)@en[[[roundtuit:]]]]
- [CODE(URI)@en[[[x-seesmic:]]]]
- [CODE(URI)@en[[[simplenote:]]]]
- [CODE(URI)@en[[[surfboard:]]]]
- [CODE(URI)@en[[[threadnote:]]]]
- [CODE(URI)@en[[[tikisurf:]]]]
- [CODE(URI)@en[[[timelog:]]]]
- [CODE(URI)@en[[[twitter:]]]]
- [425] [CODE(URI)@en[[[ugomemo:]]]]
- [CODE(URI)@en[[[unfragment:]]]]
- [CODE(URI)@en[[[yummy:]]]]
- [CODE(URI)@en[[[zentap:]]]]
- [CODE(URI)@en[[[zentappro:]]]]
]EG]
** 常に空文字列
** その他独自のもの
* userinfo
[454] [[userinfo]] の項を参照してください。
* IPv6 アドレス
[428] [[IPv6アドレス]]は [CODE[[['''[''']]]] と [CODE[[[''']''']]]] で括って指定することができます。
;; [429] [[URL]] ではこれらの2文字は使えないことになっていましたが、 [[IPv6アドレス]]の表記のために(だけ)使えるように変更されました。
** ゾーン識別子
[430] [[IPv6 Scoped Address]] は [[IPv6アドレス]]の後に [CODE[[[%]]]] で区切って[[ゾーン識別子]]を指定したもので、
解釈する環境における[[ネットワークインターフェイス]]とそれを使ってアクセスするべき [[IPv6アドレス]]を表したものとなっています。
[[RFC 6874]] はこれを [[authority]] として使う方法を定義しています。
[REFS[
- [431] [CITE@en[RFC 6874 - Representing IPv6 Zone Identifiers in Address Literals and Uniform Resource Identifiers]] ([TIME[2013-06-28 00:01:53 +09:00]] 版) <http://tools.ietf.org/html/rfc6874>
]REFS]
[433] 区切り文字の [CODE[[[%]]]] は、[[パーセント符号化]]して [CODE[[[%25]]]] とします [src[>>431]]。
[432] [[ゾーン識別子]]は、[[非予約文字]]はそのままでも構いませんが、それ以外は[[パーセント符号化]]します [SRC[>>431]]。
このとき使う[[文字コード]]は特に規定されていないようです。
;; [434] [[ゾーン識別子]]は[[非予約文字]]だけを使う[['''べきです''']]とされています [SRC[>>431]] が、
それは[[ゾーン識別子]]の仕様で規定するべきことで、 [[URL]] の [[RFC]] で要求するべきことではないでしょう...
;; [435] [[IPv4アドレス]]を使った [[URL]] でこの[[ゾーン識別子]]構文に相当するものはありません。
[436] この [[RFC]] が発行される前からこの構文を実装していた[[Webブラウザー]]もあり、また[[パーセント符号化]]されていない
[CODE[[[%]]]] を区切りにしている [[Webブラウザー]]もありました [SRC[>>431]]。 (特別に解釈しないでそのまま
[[OS]] に渡していただけかもしれませんが...) ただし生の [CODE[[[%]]]] を使った場合、その直後2文字が16進数として解釈できる場合、
2種類の解釈が可能となってしまいます。 [[Webブラウザー]]で[[利用者]]に [[URL]] を入力させる場合にあっては、
16進数として解釈できない場合は [CODE[[[%]]]] だけでも [CODE[[[%25]]]] の意味に扱うのがよかろうとされています [SRC[>>431]]。
[437] [[ゾーン識別子]]は特定の[[ホスト]]でしか意味をなしませんし、むしろ[[セキュリティー]]上の懸念もあります。
ですから明確な用途がある場合を除き、認めては[['''なりません''']]。例えば [[link-local address]] ([CODE[[[fe80::/10]]]])
がありますが、この [[RFC]] の執筆の時点で認められるべきなのはこれだけです。 [SRC[>>431]]
;; [438] 認められない時にどうするべきなのかは述べられていません。エラーとするべきなのか、
[[ゾーン識別子]]を削って続行するべきなのか。
[439] [[HTTP]] [[クライアント]]、[[プロキシ]]その他中間のものは外に出す [[URL]]
から[[ゾーン識別子]]を削除しなければ[['''なりません''']] [SRC[>>431]]。
;; [440] [[URL]] ではありませんが、 [CODE(HTTP)@en[[[Host:]]]] ヘッダーにも[[ゾーン識別子]]は含めるべきではなさそうです。
[441] [[URL Standard]] にはこの構文は含まれていません。
[EG[
[442]
[PRE(URI example code)[
http://[fe80::a%25en1]
]PRE]
... [SRC[>>431]] は [CODE[fe80::a]] に[[ゾーン識別子]] [CODE[en1]] を使ってアクセスすることを表しています。
]EG]
* [CODE[IPvFuture]]
[443] [[RFC 3986]] は将来の拡張用として、 [DFN[[CODE[[[IPvFuture]]]]]] 構文を定義しています。
[[IPv6アドレス]]のように [CODE[[['''[''']]]] と [CODE[[[''']''']]]] で括りますが、先頭に
[CODE[v1.]] のような版識別子がつきます。
[444] 現時点でこの構文は使われていません。また [[IANA登録簿]]もなさそうです。
;; [445] [[URL Standard]] にはこの構文はありません。
[449] [[draft-fenner-literal-zone]] は[[ゾーン識別子]]のために
[PRE(URI example code)[
http://[v6.fe80::a+en1]
http://[v1.fe80::a_en1]
]PRE]
... のような構文を提案していましたが、十分な支持を得られなかったようで、数年のブランクの後 >>431
の通り [[IPv6アドレス]]の構文を拡張する形になっています。
[REFS[
- [446] [CITE@en[draft-fenner-literal-zone-00 - Formats for IPv6 Scope Zone Identifiers in Literal Address Formats]] (2004)
<http://tools.ietf.org/html/draft-fenner-literal-zone-00>
- [447] [CITE@en[draft-fenner-literal-zone-01 - Formats for IPv6 Scope Zone Identifiers in Literal Address Formats]] (2005) <http://tools.ietf.org/html/draft-fenner-literal-zone-01>
- [448] [CITE@en[draft-fenner-literal-zone-02 - Formats for IPv6 Scope Zone Identifiers in Literal Address Formats]] (2005)
<http://tools.ietf.org/html/draft-fenner-literal-zone-02>
]REFS]
* IP アドレスを表す非標準の authority
[15] <http://[208.77.188.166]/>
[[Firefox]] は [[IPv4]] [[番地]] 208.77.188.166
の[[鯖]]に接続します。 [CODE(HTTP)@en[[[Host]]:]] には 208.77.188.166
という値が使われます。
[[Opera]] は [[IPv4]] [[番地]] 208.77.188.166
の[[鯖]]に接続します。 [CODE(HTTP)@en[[[Host]]:]] にはおそらく [208.77.188.166]
という値が使われるので、 [[Apache]] からは [CODE(HTTP)[[[400]]]]
が返ってきます。
[[Safari]] は[[鯖]]を探し続けます。
[[WinIE 7]] ではエラーが表示されます。
[407] <http://[www.google.com]/>
;; いずれも [[Windows Vista]] での結果です。
[427] [[Windows 7]] 上の [[Chrome]] では、 >>15 も >>407 もリンク先が [CODE(URI)@en[[[about:blank]]]] になりました。
[[解決]]できない [[URL]] として扱われているのでしょうか。 [TIME[2013-10-14T13:03:57.500Z]]
* authority 以外のドメイン名
- [410] [[メール・アドレス]]型の構造の後半部分
-- [CODE(URI)@en[[[mailto:]]]], [CODE(URI)@en[[[sip:]]]] など
- [411] [[path]] に埋め込まれた [[URL]] の [[authority]] 部分
-- [CODE(URI)@en[[[view-source:]]]], [CODE(URI)@en[[[jar:]]]], [CODE(URI)@en[[[service:]]]], [CODE(URI)@en[[[blob:]]]],
[CODE(URI)@en[[[jdbc:]]]] など
- [455] [[scheme data]]
-- [CODE(URI)@en[[[turn:]]]], [CODE(URI)@en[[[turns:]]]], [CODE(URI)@en[[[stun:]]]], [CODE(URI)@en[[[stuns:]]]]
* 仕様書から
** RFC 1738 (URL) 3.1. Common Internet Scheme Syntax
> While the syntax for the rest of the URL may vary depending on the
particular scheme selected, URL schemes that involve the direct use
of an IP-based protocol to a specified host on the Internet use a
common syntax for the scheme-specific data:
>
- [CODE[//<user>:<password>@<host>:<port>/<url-path>]]
> Some or all of the parts "<user>:<password>@", ":<password>",
":<port>", and "/<url-path>" may be excluded. The scheme specific
data start with a double slash "//" to indicate that it complies with
the common Internet scheme syntax. The different components obey the
following rules:
>
:user:An optional user name. Some schemes (e.g., ftp) allow the specification of a user name.
:password:An optional password. If present, it follows the user name separated from it by a colon.
> The user name (and password), if present, are followed by a commercial at-sign "@". Within the user and password field, any ":", "@", or "/" must be encoded.
> Note that an empty user name or password is different than no user name or password; there is no way to specify a password without specifying a user name. E.g., <URL:ftp://@host.com/> has an empty user name and no password, <URL:ftp://host.com/> has no user name, while <URL:ftp://foo:@host.com/> has a user name of "foo" and an empty password.
>
:host The fully qualified domain name of a network host, or its IP address as a set of four decimal digit groups separated by ".". Fully qualified domain names take the form as described in Section 3.5 of RFC 1034 [13] and Section 2.1 of RFC 1123 [5]:a sequence of domain labels separated by ".", each domain label starting and ending with an alphanumerical character and possibly also containing "-" characters. The rightmost domain label will never start with a digit, though, which syntactically distinguishes all domain names from the IP addresses.
:port:The port number to connect to. Most schemes designate protocols that have a default port number. Another port number may optionally be supplied, in decimal, separated from the host by a colon. If the port is omitted, the colon is as well.
: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.
> The url-path syntax depends on the scheme being used, as does the manner in which it is interpreted.
** RFC 1808 (相対 URL) 2.4.3. Parsing the Network Location/Login
> If the parse string begins with a double-slash "//", then the
substring of characters after the double-slash and up to, but not
including, the next slash "/" character is the network location/login
(<net_loc>) of the URL. If no trailing slash "/" is present, the
entire remaining parse string is assigned to <net_loc>. The double-slash and <net_loc> are removed from the parse string before continuing.
解析文字列が二重斜線 [CODE(URI)[//]] から始まる場合、その二重斜線から次の斜線 [CODE(URI)[/]] 文字の手前までの部分文字列が URL のネットワーク位置・ログイン ([CODE(ABNF)[[[net_loc]]]]) です。
お尻の斜線 [CODE(URI)[/]] がない場合には、解析文字列の残りの部分全体が [CODE(ABNF)[net_loc]] に割り当てられます。
二重斜線及び [CODE(ABNF)[net_loc]] は、続行する前に解析文字列から削除します。
** RFC 2396 (URI) 3.2. Authority Component
> Many URI schemes include a top hierarchical element for a naming
authority, such that the namespace defined by the remainder of the
URI is governed by that authority. This authority component is
typically defined by an Internet-based server or a scheme-specific
registry of naming authorities.
多くの URI scheme は、最上位階層要素として命名権者を含めており、 URI の残りの部分で定義される名前空間はその命名権者の領めるところとなります。
この命名権者部品は、典型的にはインターネットを基にしたサーバー又は scheme 定義の命名権者登録簿により定義されます。
>
- [CODE(ABNF)[[DFN[authority = server | reg_name]]]]
> The authority component is preceded by a double slash "//" and is
terminated by the next slash "/", question-mark "?", or by the end of
the URI. Within the authority component, the characters ";", ":",
"@", "?", and "/" are reserved.
命名権者部品は前に二重斜線 [CODE(URI)[//]] がつき、
次の斜線 [CODE(URI)[/]], 疑問符 [CODE(URI)[?]]
又は URI の末端により終端されます。
命名権者部品中では、文字 [CODE(URI)[;]],
[CODE(URI)[:]], [CODE(URI)[@]],
[CODE(URI)[?]], [CODE(URI)[/]] が[[予約]]されています。
> An authority component is not required for a URI scheme to make use
of relative references. A base URI without an authority component
implies that any relative reference will also be without an authority component.
命名権者部品は、 URI scheme が相対参照を使うために必須ではありません。
命名権者部品なしの[[基底URI]] は、
全ての相対参照が命名権者部品のやはり欠けたものであることを暗に示します。
*** 3.2.1. Registry-based Naming Authority
> The structure of a registry-based naming authority is specific to the
URI scheme, but constrained to the allowed characters for an
authority component.
登録簿を基にした命名権者は URI scheme に特有のものですが、
命名権者部品で許される文字に制約されます。
>
- [CODE(ABNF)[[DFN[reg_name]] = 1*( [[unreserved]] | [[escaped]] | "$" | "," | ";" | ":" | "@" | "&" | "=" | "+" )]]
*** 3.2.2. Server-based Naming Authority
> URL schemes that involve the direct use of an IP-based protocol to a
specified server on the Internet use a common syntax for the server
component of the URI's scheme-specific data:
インターネットの特定のサーバーに対する
IP を基にしたプロトコルの直接使用を含んだ URL scheme
は、 URI の scheme 特定データのサーバー部品に共通の構文を使います。
>
- [CODE[<userinfo>@<host>:<port>]]
> where <userinfo> may consist of a user name and, optionally, scheme-specific information about how to gain authorization to access the server. The parts "<userinfo>@" and ":<port>" may be omitted.
ここで、 [CODE[userinfo]] は利用者の名前を入れることができて、任意選択によって、サーバーに接続するための認証の方法についての scheme 特有の情報をも入れることができます。
[CODE[<userinfo>@]] の部分と [CODE[:<port>]] の部分アh省略可能です。
>
- [CODE(ABNF)[[DFN[server]] = [ [ [[userinfo]] "@" ] [[hostport]] ] ]]
> The user information, if present, is followed by a commercial at-sign "@".
利用者情報を示す場合は、その後に単価記号 [CODE(URI)[@]] が続きます。
>
- [CODE(ABNF)[[DFN[userinfo]] = *( [[unreserved]] | [[escaped]] | ";" | ":" | "&" | "=" | "+" | "$" | "," )]]
> Some URL schemes use the format "user:password" in the userinfo
field. This practice is NOT RECOMMENDED, because the passing of
authentication information in clear text (such as URI) has proven to
be a security risk in almost every case where it has been used.
URL scheme によっては、 [CODE(ABNF)[userinfo]]
欄に [CODE[[VAR[user]]:[VAR[password]]]] の書式を使います。
この慣習は、認証情報を[[平文]] (URI とか。)
で渡すことはその使用されるほとんど全ての場合に置いて安全上の危険を負うこととなるので、'''推奨しません'''。
> The host is a domain name of a network host, or its IPv4 address as a
set of four decimal digit groups separated by ".". Literal IPv6
addresses are not supported.
[CODE(ABNF)[[[host]]]] は、ネットワーク・ホストのドメイン名か、その [[IPv4アドレス]]を [CODE(URI)[.]] で分離した4つの10進数集団の集合としたものです。
生 [[IPv6アドレス]]には対応していません。
>
- [CODE(ABNF)[[DFN[[[hostport]]]] = host [ ":" [[port]] ] ]]
- [CODE(ABNF)[[DFN[host]] = hostname | [[IPv4address]]]]
- [CODE(ABNF)[[DFN[hostname]] = *( domainlabel "." ) toplabel [ "." ] ]]
- [CODE(ABNF)[[DFN[domainlabel]] = [[alphanum]] | alphanum *( alphanum | "-" ) alphanum]]
- [CODE(ABNF)[[DFN[toplabel]] = alpha | alpha *( alphanum | "-" ) alphanum]]
- [CODE(ABNF)[[DFN[IPv4address]] = 1*digit "." 1*digit "." 1*digit "." 1*digit]]
- [CODE(ABNF)[[DFN[port]] = *digit]]
> Hostnames take the form described in Section 3 of [RFC1034] and Section 2.1 of [RFC1123]: a sequence of domain labels separated by ".", each domain label starting and ending with an alphanumeric character and possibly also containing "-" characters. The rightmost domain label of a fully qualified domain name will never start with a digit, thus syntactically distinguishing domain names from IPv4 addresses, and may be followed by a single "." if it is necessary to distinguish between the complete domain name and any local domain. To actually be "Uniform" as a resource locator, a URL hostname should be a fully qualified domain name. In practice, however, the host component may be a local domain literal.
ホスト名は、 RFC 1034 の3章と RFC 1123 の2.1章で説明されている形を取りました。 [CODE[.]] で分離されたドメイン札の連続体で、それぞれのドメイン札は英数字で始まり英数字で終わり、 [CODE[-]] を含めることもできます。[[完全修飾ドメイン名]]の再右ドメイン札は数字で始まることはないので、 IPv4 アドレスとドメイン名を構文的に区別できますし、完全などメイン名と局所ドメインを区別する必要がある時には単一の [CODE[.]] を続けることができます。
真に「統一」された資源位置子であるためには、 URL
ホスト名は完全修飾名であるべきです。しかし、実際にはホスト部品は局所ドメイン札かもしれません。
> Note: A suitable representation for including a literal IPv6
address as the host part of a URL is desired, but has not yet been
determined or implemented in practice.
注意 : URL のホスト部分として生 IPv6 アドレスを含める適当な表現が望まれますが、まだ決定していませんし実際に実装されてもいません。
> The port is the network port number for the server. Most schemes
designate protocols that have a default port number. Another port
number may optionally be supplied, in decimal, separated from the
host by a colon. If the port is omitted, the default port number is assumed.
[CODE(ABNF)[port]] は、サーバーのネットワーク・ポート番号です。ほとんどの scheme は既定ポート番号のあるプロトコルを指示しています。
他のポート番号は省略可能ですが10進数で [CODE(ABNF)[host]]
とコロンで区切って指定して構いません。
[CODE(ABNF)[port]] が省略されている時には、
既定ポート番号が仮定されます。
** RFC 2774 (IPv6 アドレス in URI)
→[[RFC2774]]
** RFC の部分の License
[[RFCのライセンス]]
* メモ
- [1] ''834489 - Internet Explorer で HTTP URL と HTTPS URL のユーザー情報を処理する際のデフォルトの動作を変更するソフトウェア アップデートのリリースについて'' <http://support.microsoft.com/default.aspx?scid=kb;ja;834489>: [[WinIE3]]+ で対応していた [CODE(URI)[[[http]]]] および [CODE(URI)[[[https]]]] の user:password@ は、見かけ上の URI 参照を偽装することができる脆弱性が見つかりました。その対策 ([[WinIE5]]〜[[WinIE6]] 対象) で、 user:password@ が既定ではまったく使えなくされました。
[2]
[CODE(URI)[[[dcp.tcp.pft]]:]] [[URI scheme]]
は [[RFC 2396]] 的には構文的に適当でしたが、
[[RFC 3986]] で駄目になっちゃいました。
[CITE[[#XERCESJ-1060] anyURI validation is too strict - ASF JIRA]] <http://issues.apache.org/jira/browse/XERCESJ-1060>
[CITE[Reg-name conflict between 2396 and 3986]]
<mid:4256B135.3070900@metalab.unc.edu>
([[名無しさん]])
[3]
[CITE[Computer Security Research - McAfee Avert Labs Blog]] ([CODE[2007-01-23 20:48:55 +09:00]] 版) <http://www.avertlabs.com/research/blog/?p=178>
([[名無しさん]] [WEAK[2007-01-23 11:55:04 +00:00]])
[4]
[CITE[ITmedia エンタープライズ:8進数や16進数で検出回避する新手のスパム]] ([CODE[2007-01-23 20:46:26 +09:00]] 版) <http://www.itmedia.co.jp/enterprise/articles/0701/23/news016.html>
([[名無しさん]] [WEAK[2007-01-23 11:55:38 +00:00]])
[5]
[CITE@en[IEBlog : URLs in Internet Explorer 7]] ([CODE[2007-02-22 09:21:45 +09:00]] 版) <http://blogs.msdn.com/ie/archive/2005/08/15/452006.aspx>
([[名無しさん]] [WEAK[2007-02-22 00:24:26 +00:00]])
[6]
[CITE@en-us[IP Version 6 Support]] ([CODE[2007-02-22 09:23:49 +09:00]] 版) <http://msdn2.microsoft.com/en-us/library/aa385325.aspx>
([[名無しさん]] [WEAK[2007-02-22 00:24:58 +00:00]])
[7]
[CITE@en[IEBlog : IPv6 URIs in IE7]] ([CODE[2007-02-22 09:21:53 +09:00]] 版) <http://blogs.msdn.com/ie/archive/2007/02/20/ipv6-uris-in-ie7.aspx>
([[名無しさん]] [WEAK[2007-02-22 00:30:32 +00:00]])
[8]
[CITE@ja[Internet Explorer では Web サイト アドレス (HTTP URL および HTTPS URL) に含まれるユーザー名およびパスワードがサポートされない]] ([TIME[2009-04-12 12:20:01 +09:00]] 版) <http://support.microsoft.com/kb/834489/ja>
[402] [CITE[IRC logs: freenode / #whatwg / 20100423]]
([TIME[2010-05-09 21:36:01 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20100423#l-689>
[404] [CITE@en[ドット付き 10 進数 URL の不明瞭化 | Symantec Connect Community]]
( ([TIME[2011-05-15 13:47:42 +09:00]] 版))
<http://www.symantec.com/connect/blogs/10-url>
[405] [CITE[IPアドレスによるURL偽装手法まとめ | Rubusig]]
( ([TIME[2011-05-15 13:56:45 +09:00]] 版))
<http://m1n0x.hp2.jp/blog/archives/737>
[406] [CITE@ja-JP[変なIPに書き換えても繋がるかテスト]]
( ([TIME[2011-05-15 15:55:28 +09:00]] 版))
<http://abc.s65.xrea.com/1/>
[421] [CITE[Bug 10326 – make "user:password" in URLs a SYNTAX_ERR]]
( ([TIME[2011-11-14 22:12:15 +09:00]] 版))
<http://www.w3.org/Bugs/Public/show_bug.cgi?id=10326>
[422] [CITE@en[draft-carpenter-6man-uri-zoneid-00 - Representing IPv6 Zone Identifiers in Uniform Resource Identifiers]]
( ([TIME[2011-12-07 18:52:36 +09:00]] 版))
<http://tools.ietf.org/html/draft-carpenter-6man-uri-zoneid-00>
[426] [CITE[''''''[''''''whatwg'''''']'''''' URL: IPv6 parsing and model/serializing]]
( ([TIME[2012-11-17 11:03:16 +09:00]] 版))
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-November/037924.html>