/
233.txt
120 lines (87 loc) · 5.29 KB
/
233.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
[11] [DFN[[CODE(ABNF)@en[[[product]]]]]] は、[[HTTP]]
において[[ソフトウェア]]を表す構文です。
* 仕様書
[REFS[
- [5] [CITE@en[RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content]] ([TIME[2014-06-07 01:55:45 +09:00]] 版) <https://tools.ietf.org/html/rfc7231#section-5.5.3>
]REFS]
* 文脈
[12] [CODE(HTTP)@en[[[User-Agent:]]]] [[ヘッダー]]と
[CODE(HTTP)@en[[[Server:]]]] [[ヘッダー]]で使われています。
* 構文
[6] 構文は、[[字句]]、または[[字句]]、[CODE[[[/]]]]、
[[字句]]の列と定義されています [SRC[>>5]]。前者の[[字句]]が名前を、
後者の[[字句]]が版を表します [SRC[>>5]]。
[FIG(railroad)[
= [[字句]]
= ?
== [CODE[[[/]]]]
== [[字句]]
]FIG]
[7] 実際にはこの構文は必ずしも守られていません。詳しくは
[CODE(HTTP)@en[[[User-Agent:]]]] と [CODE(HTTP)@en[[[Server:]]]]
を参照してください。
* 歴史
[FIG(quote)[
[FIGCAPTION[
[8] RFC 1945 (HTTP/1.0) 3.7; RFC 2068・2616 (HTTP/1.1) 3.8 Product Tokens
]FIGCAPTION]
> Product tokens are used to allow communicating applications to
identify themselves [DEL[via a simple product token, with an optional slash and version designator]] [INS[by software name and version]].
Most fields using product tokens also allow sub[INS[-]]products
which form a significant part of the application to be listed, separated by [DEL[[INS[{1945,2068}]] whitespace]] [INS[[INS[{2616}]] white space]].
By convention, the products are listed in order of their significance
for identifying the application.
[DFN[製品字句]]は、通信する[[応用]]がソフトウェア名・版で自身を識別することができるように使います。
製品字句を使うほとんどの欄は、その応用の重要な部分を担っている部分製品を[[空白]]で分離して列挙することも認めています。
慣習上、製品は識別する応用にとって重要な順に列挙します。
>
- product = token ["/" product-version]
- product-version = token
> Examples:
例:
>
- User-Agent: CERN-LineMode/2.15 libwww/2.17b3
- Server: Apache/0.8.4
> Product tokens [DEL[[INS[{1945,2068]]] should]] [INS[SHOULD]] be short and to the point[INS[. [INS[{2616}]] They MUST NOT be used]] [DEL[[INS[{1945,2068}]] -- use of them]]
for [DEL[advertizing]] [INS[advertising]] or other non-essential information [DEL[[INS[{1945,2068}]] is explicitly forbidden]]. Although any token character [DEL[[INS[{1945,2068}]] may]] [INS[MAY]] appear in a product-version, this
token [DEL[[INS[{1945]]] should]] [INS[SHOULD]] only be used for a version identifier
(i.e., successive versions of the same product [DEL[should]] [INS[SHOULD]] only differ in
the product-version portion of the product value).
製品字句は短く、的を射たものである'''べきです'''。
これを宣伝や他の非本質的な情報に使っては'''なりません'''。
[CODE(ABNF)[product-version]] では任意の字句文字を使っても構いませんが、
この字句は版識別子にのみ使用する'''べきです'''
(つまり、同じ製品の後継版は [CODE(ABNF)[product]] 値の [CODE(ABNF)[product-version]]
部分だけが異なる'''べきです''')。
]FIG]
* 関連
[9] [CODE(HTTP)@en[[[Via:]]]] 欄では [CODE(ABNF)@en[[[comment]]]]
が[[串]]のソフトウェアを識別するために使われています。
[10] [[プロトコルの版]]も [CODE(ABNF)@en[[[product]]]]
と同じような構文ですが、仕様上は別のものとされています。
[13] [[Metalink]] の [CODE(XMLe)@en[[[generator]]]] [[要素]]も同様の構文を独自に定義しています。
* メモ
[1]
[CITE[PICSRules Specification]] <http://www.w3.org/TR/REC-PICSRules-971229#OrderOfOperations>
[CODE[[[creationTool]]]] 属性は
[CODE(HTTP)[[[User-Agent]]]] 欄と同じような書式を採用しています。
[2] [CITE@en[Web Applications 1.0 r7747 Needed for compatibility.]]
( ([TIME[2013-03-09 11:02:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7746&to=7747>
[3] [CITE@en[リークしたIE11の情報からいろいろ邪推する - fragmentary]]
( ([TIME[2013-04-05 07:48:46 +09:00]] 版))
<http://myakura.hatenablog.com/entry/2013/04/04/195122>
[4] [CITE@en[Web Applications 1.0 r8038 Spec navigator.appCodeName (and respec navigator.product) constant(s)]]
( ([TIME[2013-07-09 11:36:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8037&to=8038>
[FIG(quote)[
[FIGCAPTION[
[14] [CITE[OASIS Open Document Format for Office Applications (OpenDocument) Version 1.2 - Part 1: OpenDocument Schema]]
([TIME[2011-09-29 13:00:00 +09:00]] 版)
<http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#a4_3_2_1_meta_generator_>
]FIGCAPTION]
> The <meta:generator> element contains a string that identifies the OpenDocument producer that was used to create or last modify the document. This string should match the definition for user-agents in the HTTP protocol as specified in section 14.43 of '''['''RFC2616''']'''.
]FIG]
[15] [CITE@en[Expose some NavigatorID members only on Window · whatwg/html@1b1ab95]]
([TIME[2015-10-02 11:01:10 +09:00]] 版)
<https://github.com/whatwg/html/commit/1b1ab957814561d1e819a8ea4f03d5fd7f5a050e>