发信人: kenmlee()
整理人: kenmlee(2000-07-08 16:49:07), 站内信件
|
3.8 Product Tokens
#3.8 产品标志 /#
Product tokens are used to allow communicating applications to
identify themselves by software name and version. Most fields using
product tokens also allow sub-products which form a significant par
t
of the application to be listed, separated by whitespace. By
convention, the products are listed in order of their significance
for identifying the application.
product = token ["/" product-version]
product-version = token
# 产品标志用于允许通行应用程序用软件名称和版本标示自身,大部分适用产品
标示的域都允许用空格分隔列出子产品以形成应用的各个主要部分。为方便起
见产品按在应用中的主要性排列。
product = token ["/" product-version]
product-version = token
/#
Examples:
User-Agent: CERN-LineMode/2.15 libwww/2.17b3
Server: Apache/0.8.4
# 例如:
User-Agent: CERN-LineMode/2.15 libwww/2.17b3
Server: Apache/0.8.4
/#
Product tokens should be short and to the point -- use of them for
advertising or other non-essential information is explicitly
forbidden. Although any token character may appear in a product-
version, this token SHOULD only be used for a version identifier
(i.e., successive versions of the same product SHOULD only differ i
n
the product-version portion of the product value).
# 产品标示应该尽量短小和精确,强烈禁止将它们用于广告或其他不必要的信息
。
虽然在产品版本中可出现任何标示字符,但应该只采用版本标示(例如,相同
产品的序列版本应该仅仅在产品的产品版本部分有区别。
/#
3.9 Quality Values
#3.9 质量值 /#
HTTP content negotiation (section 12) uses short "floating point"
numbers to indicate the relative importance ("weight") of various
negotiable parameters. A weight is normalized to a real number in t
he
range 0 through 1, where 0 is the minimum and 1 the maximum value.
HTTP/1.1 applications MUST NOT generate more than three digits afte
r
the decimal point. User configuration of these values SHOULD also b
e
limited in this fashion.
qvalue = ( "0" [ "." 0*3DIGIT ] )
| ( "1" [ "." 0*3("0") ] )
# HTTP内容协商(第12节)使用短的浮点数字指出不同协商内容的相对重要性(
权值)。
权值被规范化到从0到1的实数,0标示最小,1标示最大。HTTP/1.1应用最多在
小数点
后生成三位数字,用户对这些值的配置也应该受到这样的限制。
qvalue = ( "0" [ "." 0*3DIGIT ] )
| ( "1" [ "." 0*3("0") ] )
/#
"Quality values" is a misnomer, since these values merely represent
relative degradation in desired quality.
# 质量值(Quality values)的用词是不当的,因为这些值仅仅表示相对的理想
质量
的差距。
/#
3.10 Language Tags
#3.10 语言标示 /#
A language tag identifies a natural language spoken, written, or
otherwise conveyed by human beings for communication of information
to other human beings. Computer languages are explicitly excluded.
HTTP uses language tags within the Accept-Language and Content-
Language fields.
# 语言标示用于标识读写的自然语言或人们用户相互交流的转换方式,计算机语
言
不在这个范围内,HTTP在接受语言(Accept-Language)和内容语言
(Content-Language)头域中使用语言标示。
/#
The syntax and registry of HTTP language tags is the same as that
defined by RFC 1766 [1]. In summary, a language tag is composed of
1
or more parts: A primary language tag and a possibly empty series o
f
subtags:
language-tag = primary-tag *( "-" subtag )
primary-tag = 1*8ALPHA
subtag = 1*8ALPHA
# RFC 1766[1]定义了HTTP语言标示的语法和注册信息,总的来说,语言标示由
1个
或多个部分组成:一个主语言标示和可以为空的一系列子标示:
language-tag = primary-tag *( "-" subtag )
primary-tag = 1*8ALPHA
subtag = 1*8ALPHA
/#
Whitespace is not allowed within the tag and all tags are case-
insensitive. The name space of language tags is administered by the
IANA. Example tags include:
en, en-US, en-cockney, i-cherokee, x-pig-latin
where any two-letter primary-tag is an ISO 639 language abbreviatio
n
and any two-letter initial subtag is an ISO 3166 country code. (The
last three tags above are not registered tags; all but the last are
examples of tags which could be registered in future.)
# 标示中不允许出现空格并且所有标示都是大小写不敏感的,IANA管理语言标示
的名
字空间。标示的例子如下:
en, en-US, en-cockney, i-cherokee, x-pig-latin
其中所有两个字母的主标示是一个ISO 639语言缩写,所有两个字母首字母大
写的
子标示是一个ISO 3166国家代码。(后面的三个标示是未注册的标示,例子中
除
最后一个外其他所有的标示在将来都会被注册。)
/#
3.11 Entity Tags
#3.11 实体标示 /#
Entity tags are used for comparing two or more entities from the sa
me
requested resource. HTTP/1.1 uses entity tags in the ETag (section
14.20), If-Match (section 14.25), If-None-Match (section 14.26), an
d
If-Range (section 14.27) header fields. The definition of how they
are used and compared as cache validators is in section 13.3.3. An
entity tag consists of an opaque quoted string, possibly prefixed b
y
a weakness indicator.
entity-tag = [ weak ] opaque-tag
weak = "W/"
opaque-tag = quoted-string
# 实体标示用于比较相同请求资源中两个或更多的实体,HTTP/1.1在ETag(见第
14.20节)
,If-Match(见第14.25节),If-None-Match(见第14.26节)和If-Range
(见第14.27节)头域中使用实体标示。第13.3.3节定义了在缓存合法判定中实
体
标示如何使用和比较,一个实体标示由一个非透明的引用串(opaque quoted
string)
和弱指示符前缀(weakness indicator)。
entity-tag = [ weak ] opaque-tag
weak = "W/"
opaque-tag = quoted-string
/#
A "strong entity tag" may be shared by two entities of a resource
only if they are equivalent by octet equality.
# "强实体标示(strong entity tag)"可以在资源的两个实体间共享时,必须是
字节相等的.
/#
A "weak entity tag," indicated by the "W/" prefix, may be shared by
two entities of a resource only if the entities are equivalent and
could be substituted for each other with no significant change in
semantics. A weak entity tag can only be used for weak comparison.
# "弱实体标示"用前缀"W/"指出,可以在资源的两个实体间共享时,必须是在
语法上无显著区别的可互相代替的。弱实体标示只能用于弱比较。
/#
An entity tag MUST be unique across all versions of all entities
associated with a particular resource. A given entity tag value may
be used for entities obtained by requests on different URIs without
implying anything about the equivalence of those entities.
# 一个实体标示必须对一个特定的资源而言在所有实体及其所有版本中是唯一的
。
一个实体标示的值可能在不同的URI请求后的得到,但这不表示这些实体是相
等
的。
/#
3.12 Range Units
#3.12 范围单元/#
HTTP/1.1 allows a client to request that only part (a range of) the
response entity be included within the response. HTTP/1.1 uses rang
e
units in the Range (section 14.36) and Content-Range (section 14.17
)
header fields. An entity may be broken down into subranges accordin
g
to various structural units.
range-unit = bytes-unit | other-range-unit
bytes-unit = "bytes"
other-range-unit = token
# HTTP/1.1允许客户请求返回的响应中的部分(一定的范围)响应实体.HTTP/1.1
使用范围单元(range units)在Range(见第14.36节)和Content-Range(见第14
.17节)
头域中.一个实体可能被分成不同结构的子范围单元.
range-unit = bytes-unit | other-range-unit
bytes-unit = "bytes"
other-range-unit = token
/#
The only range unit defined by HTTP/1.1 is "bytes". HTTP/1.1
implementations may ignore ranges specified using other units.
HTTP/1.1 has been designed to allow implementations of applications
that do not depend on knowledge of ranges.
# HTTP/1.1定义的范围单元只有"比特(bytes)".符合HTTP/1.1的实现可以忽略使
用
其他单元指定的范围.HTTP/1.1被设计为允许不依赖范围概念的应用的实现.
/#
-- ※ 修改:.kenmlee 于 Jul 8 16:30:26 修改本文.[FROM: 61.140.188.222] ※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 61.140.188.222]
|
|