`
hideto
  • 浏览: 2678939 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

HTTP1.1 Notes 1, Terminology & ABNF

阅读更多
http://www.w3.org/Protocols/rfc2616/rfc2616.html
http://en.wikipedia.org/wiki/Backus-Naur_form
http://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_Form

Terminology
connection
    A transport layer virtual circuit established between two programs for the purpose of communication.
message
    The basic unit of HTTP communication, consisting of a structured sequence of octets matching the syntax defined in section 4 and transmitted via the connection.
request
    An HTTP request message, as defined in section 5.
response
    An HTTP response message, as defined in section 6.
resource
    A network data object or service that can be identified by a URI, as defined in section 3.2. Resources may be available in multiple representations (e.g. multiple languages, data formats, size, and resolutions) or vary in other ways.
entity
    The information transferred as the payload of a request or response. An entity consists of metainformation in the form of entity-header fields and content in the form of an entity-body, as described in section 7.
representation
    An entity included with a response that is subject to content negotiation, as described in section 12. There may exist multiple representations associated with a particular response status.
content negotiation
    The mechanism for selecting the appropriate representation when servicing a request, as described in section 12. The representation of entities in any response can be negotiated (including error responses).
variant
    A resource may have one, or more than one, representation(s) associated with it at any given instant. Each of these representations is termed a `varriant'. Use of the term `variant' does not necessarily imply that the resource is subject to content negotiation.
client
    A program that establishes connections for the purpose of sending requests.
user agent
    The client which initiates a request. These are often browsers, editors, spiders (web-traversing robots), or other end user tools.
server
    An application program that accepts connections in order to service requests by sending back responses. Any given program may be capable of being both a client and a server; our use of these terms refers only to the role being performed by the program for a particular connection, rather than to the program's capabilities in general. Likewise, any server may act as an origin server, proxy, gateway, or tunnel, switching behavior based on the nature of each request.
origin server
    The server on which a given resource resides or is to be created.
proxy
    An intermediary program which acts as both a server and a client for the purpose of making requests on behalf of other clients. Requests are serviced internally or by passing them on, with possible translation, to other servers. A proxy MUST implement both the client and server requirements of this specification. A "transparent proxy" is a proxy that does not modify the request or response beyond what is required for proxy authentication and identification. A "non-transparent proxy" is a proxy that modifies the request or response in order to provide some added service to the user agent, such as group annotation services, media type transformation, protocol reduction, or anonymity filtering. Except where either transparent or non-transparent behavior is explicitly stated, the HTTP proxy requirements apply to both types of proxies.
gateway
    A server which acts as an intermediary for some other server. Unlike a proxy, a gateway receives requests as if it were the origin server for the requested resource; the requesting client may not be aware that it is communicating with a gateway.
tunnel
    An intermediary program which is acting as a blind relay between two connections. Once active, a tunnel is not considered a party to the HTTP communication, though the tunnel may have been initiated by an HTTP request. The tunnel ceases to exist when both ends of the relayed connections are closed.
cache
    A program's local store of response messages and the subsystem that controls its message storage, retrieval, and deletion. A cache stores cacheable responses in order to reduce the response time and network bandwidth consumption on future, equivalent requests. Any client or server may include a cache, though a cache cannot be used by a server that is acting as a tunnel.
cacheable
    A response is cacheable if a cache is allowed to store a copy of the response message for use in answering subsequent requests. The rules for determining the cacheability of HTTP responses are defined in section 13. Even if a resource is cacheable, there may be additional constraints on whether a cache can use the cached copy for a particular request.
first-hand
    A response is first-hand if it comes directly and without unnecessary delay from the origin server, perhaps via one or more proxies. A response is also first-hand if its validity has just been checked directly with the origin server.
explicit expiration time
    The time at which the origin server intends that an entity should no longer be returned by a cache without further validation.
heuristic expiration time
    An expiration time assigned by a cache when no explicit expiration time is available.
age
    The age of a response is the time since it was sent by, or successfully validated with, the origin server.
freshness lifetime
    The length of time between the generation of a response and its expiration time.
fresh
    A response is fresh if its age has not yet exceeded its freshness lifetime.
stale
    A response is stale if its age has passed its freshness lifetime.
semantically transparent
    A cache behaves in a "semantically transparent" manner, with respect to a particular response, when its use affects neither the requesting client nor the origin server, except to improve performance. When a cache is semantically transparent, the client receives exactly the same response (except for hop-by-hop headers) that it would have received had its request been handled directly by the origin server.
validator
    A protocol element (e.g., an entity tag or a Last-Modified time) that is used to find out whether a cache entry is an equivalent copy of an entity.
upstream/downstream
    Upstream and downstream describe the flow of a message: all messages flow from upstream to downstream.
inbound/outbound
    Inbound and outbound refer to the request and response paths for messages: "inbound" means "traveling toward the origin server", and "outbound" means "traveling toward the user agent"

ABNF
name = definition
    The name of a rule is simply the name itself (without any enclosing "<" and ">") and is separated from its definition by the equal "=" character. White space is only significant in that indentation of continuation lines is used to indicate a rule definition that spans more than one line. Certain basic rules are in uppercase, such as SP, LWS, HT, CRLF, DIGIT, ALPHA, etc. Angle brackets are used within definitions whenever their presence will facilitate discerning the use of rule names.
"literal"
    Quotation marks surround literal text. Unless stated otherwise, the text is case-insensitive.
rule1 | rule2
    Elements separated by a bar ("|") are alternatives, e.g., "yes | no" will accept yes or no.
(rule1 rule2)
    Elements enclosed in parentheses are treated as a single element. Thus, "(elem (foo | bar) elem)" allows the token sequences "elem foo elem" and "elem bar elem".
*rule
    The character "*" preceding an element indicates repetition. The full form is "<n>*<m>element" indicating at least <n> and at most <m> occurrences of element. Default values are 0 and infinity so that "*(element)" allows any number, including zero; "1*element" requires at least one; and "1*2element" allows one or two.
[rule]

    Square brackets enclose optional elements; "[foo bar]" is equivalent to "*1(foo bar)".
N rule
    Specific repetition: "<n>(element)" is equivalent to "<n>*<n>(element)"; that is, exactly <n> occurrences of (element). Thus 2DIGIT is a 2-digit number, and 3ALPHA is a string of three alphabetic characters.
#rule
    A construct "#" is defined, similar to "*", for defining lists of elements. The full form is "<n>#<m>element" indicating at least <n> and at most <m> elements, each separated by one or more commas (",") and OPTIONAL linear white space (LWS). This makes the usual form of lists very easy; a rule such as

             ( *LWS element *( *LWS "," *LWS element ))

    can be shown as

             1#element

    Wherever this construct is used, null elements are allowed, but do not contribute to the count of elements present. That is, "(element), , (element) " is permitted, but counts as only two elements. Therefore, where at least one element is required, at least one non-null element MUST be present. Default values are 0 and infinity so that "#element" allows any number, including zero; "1#element" requires at least one; and "1#2element" allows one or two.
; comment
    A semi-colon, set off some distance to the right of rule text, starts a comment that continues to the end of line. This is a simple way of including useful notes in parallel with the specifications.
implied *LWS
    The grammar described by this specification is word-based. Except where noted otherwise, linear white space (LWS) can be included between any two adjacent words (token or quoted-string), and between adjacent words and separators, without changing the interpretation of a field. At least one delimiter (LWS and/or
    separators) MUST exist between any two tokens (for the definition of "token" below), since they would otherwise be interpreted as a single token.

ABNF Basic Rules
OCTET          = <any 8-bit sequence of data>
CHAR           = <any US-ASCII character (octets 0 - 127)>
UPALPHA        = <any US-ASCII uppercase letter "A".."Z">
LOALPHA        = <any US-ASCII lowercase letter "a".."z">
ALPHA          = UPALPHA | LOALPHA
DIGIT          = <any US-ASCII digit "0".."9">
CTL            = <any US-ASCII control character
                 (octets 0 - 31) and DEL (127)>
CR             = <US-ASCII CR, carriage return (13)>
LF             = <US-ASCII LF, linefeed (10)>
SP             = <US-ASCII SP, space (32)>
HT             = <US-ASCII HT, horizontal-tab (9)>
<">            = <US-ASCII double-quote mark (34)>
CRLF           = CR LF
LWS            = [CRLF] 1*( SP | HT )
TEXT           = <any OCTET except CTLs,
                        but including LWS>
HEX            = "A" | "B" | "C" | "D" | "E" | "F"
                      | "a" | "b" | "c" | "d" | "e" | "f" | DIGIT
token          = 1*<any CHAR except CTLs or separators>
       separators     = "(" | ")" | "<" | ">" | "@"
                      | "," | ";" | ":" | "\" | <">
                      | "/" | "[" | "]" | "?" | "="
                      | "{" | "}" | SP | HT
comment        = "(" *( ctext | quoted-pair | comment ) ")"
       ctext          = <any TEXT excluding "(" and ")">
quoted-string  = ( <"> *(qdtext | quoted-pair ) <"> )
       qdtext         = <any TEXT except <">>
quoted-pair    = "\" CHAR
分享到:
评论

相关推荐

    Batch Control Part 1 Models and Terminology

    《Batch Control Part 1: Models and Terminology》是美国国家标准学会(ANSI)和国际自动化学会(ISA)联合发布的标准,主要关注批量控制的基本概念、模型及术语定义。这一标准提供了关于批量制造过程中的控制系统设计...

    MRM0016_人力需求提報表(20130715).docx

    1. 人力需求提报表的功能規格定議 人力需求提报表是人力资源管理中的一种重要工具,用于记录和管理员工的绩效考核结果。在该文档中,我们可以看到人力需求提报表的功能規格定議,包括参数配置、修改歷程、...

    SAE J670e-1976 Vehicle Dynamics Terminology.pdf

    SAE J670e-1976 Vehicle Dynamics Terminology.pdf 知识点一:SAE技术标准委员会规则 * 《SAE Technical Standards Board Rules》规定:本报告由SAE发布,以推进技术和工程科学的发展。报告的使用完全是自愿的,其...

    Enterprise-control system integration Part 1:Models and terminology

    ### 企业控制系统集成——第1部分:模型与术语 #### 概述 国际电工委员会(IEC)标准62264是一部多部分标准,旨在定义企业活动与控制活动之间的接口,并提供了标准化的模型和术语来描述企业业务系统与其制造控制...

    2020FRM L1 L2 Notes

    You must learn the material, know the terminology and techniques, understand the concepts, and be able to answer 100 multiple-choice questions quickly and (at least 70%) correctly. A good estimate of...

    BS EN 764-1-2004 Part 1 Terminology — Pressuretemperature volume

    【标题】"BS EN 764-1-2004 第1部分:术语——压力、温度、体积" 【描述】"BS EN 764-1-2004是关于压力设备的标准,其第1部分专门定义了与压力、温度和体积相关的术语。" 【标签】"iec" 【内容概述】 BS EN 764-...

    CPIM ECO Terminology

    1. 吸收成本法(Absorption costing):这是一种库存估值方法,将变动成本和一部分固定成本分摊到每个生产单位。固定成本通常根据直接人工小时、机器小时或材料成本分配到产出单位上。 2. 可接受质量水平...

    英文原版-Mosbys Medical Terminology Flash Cards 3rd Edition

    Fun, quick, and easy to study while on the go, Mosby’s Medical Terminology Flash Cards, 3rd Edition provide a great tool for learning and reviewing medical terms. 600 full-color flash cards help ...

    BS EN ISO 5395-1-2013 Terminology and common tests

    标题 "BS EN ISO 5395-1-2013 Terminology and common tests" 涉及的是园艺设备安全标准,特别是针对燃烧发动机驱动的割草机的安全要求。这个标准是英国对EN ISO 5395-1:2013的实施版本,同时与BS EN ISO 5395-2:...

    IEEE_standard_for_Terminology_and_Test_methods_for_ADC_Std_1241-2010

    ### IEEE Standard for Terminology and Test Methods for Analog-to-Digital Converters (Std 1241-2010) #### 标准概述 IEEE Std 1241-2010 是一项针对模拟到数字转换器(Analog-to-Digital Converters, ADC)的...

    USB4 TMU CTS 1.1 - REDLINE.pdf

    USB4 TMU CTS 1.1即USB4时间同步一致性测试规范(Compliance Test Specification)版本1.1,该文件的发布日期为2021年1月。该规范是用来确保路由器设备符合USB4基础规范的第7章节的要求。USB4规范是一种先进的通信...

    SAE J1715-2:2021 Battery Terminology - 完整英文电子版(28页).pdf

    1. 汽车工业:电池是汽车工业的核心组件,SAE J1715-2:2021 Battery Terminology标准对汽车工业的电池应用具有重要的影响,提高了汽车的性能和可靠性。 2. 电动工具:电池是电动工具的核心组件,SAE J1715-2:2021...

    Protected Interoperable File Format (PIFF) 1.1

    1. Protected Interoperable File Format(PIFF)的定义和重要性 PIFF(Protected Interoperable File Format)是一种文件格式,它旨在提供一种安全、兼容的方法来编码音频和视频对象。这种格式的主要目的是促进不同...

    The Transport Layer Security (TLS) Protocol V1.1

    ### Transport Layer Security (TLS) Protocol Version 1.1 #### Introduction The Transport Layer Security (TLS) protocol is a fundamental standard for securing internet communications. Version 1.1 of ...

    Terminology.zip

    1. 下载压缩文件并解压缩,得到Terminology.dictionary文件 2. 将Terminology.dictionary复制到隐藏目录~/Library/Dictionaries中 3. 打开Mac词典程序,从首选项中激活Terminology词典 4. 接下来就可以愉快的查询...

    BRD_PRD_PBXWarning_20121123.doc

    1. 软件开发责任: Primary Responsibility: Software Developer,这表明该项目的主要责任人是软件开发者。 2. 保密协议:This contents is confidential, protected under an enforceable no-disclosure agreement...

    ANSI/ISA-88.00.01-2010 批量控制 第一部分:模型和术语 - 完整英文版(156页)

    完整英文版 ANSI/ISA-88.00.01-2010 Batch Control Part 1:Models and Terminology(批量控制第一部分:模型和术语)。这个关于批次控制的第1部分标准定义了流程工业中使用的批次和相关程序导向的制造的参考模型,...

    IEC 62264-1:2013 企业控制系统集成 - 第 1 部分:模型和术语 - 完整英文版(171页)

    完整英文版 IEC 62264-1:2013 Enterprise-control system integration - Part 1:Models and terminology (企业控制系统集成 - 第 1 部分:模型和术语)。IEC 62264-1:2013描述了制造运营管理域(第3级)及其活动,...

Global site tag (gtag.js) - Google Analytics