2024年3月9日发(作者:)

HTTP/1.1协议规范(中文归纳版)

一、介绍(introduction)

1. 目的——HTTP/0.9-〉HTTP/1.0-〉HTTP/1.1

2. 要求——MUST、REQUIRED、SHOULD

3. 术语——连接(Connection)、消息(Message)、请求(Request)、应答(Response)、

资源(Resource)、实体 (Entity)、表示方法(Representation)、内容协商(Content

Negotiation)、变量(Variant)、客户机(Client)、用户代理(User agent)、服务器(Server)、

原服务器(Origin server)、代理服务器( Proxy)、网关(gateway)、高速缓存(Cache)、

可缓存(Cacheable)、直接(first-hand)、明确终止时间(explicit expiration time)、

探索终止时间(heuristic expiration time)、年龄(Age)、保鲜寿命(Freshness lifetime)、

保鲜(Fresh)、陈旧(Stale)、语义透明(semantically transparent)、有效性判别器

(Validator)、实体标记(entity tag)或最终更改时间(Last-Modified time))、上游/

下游(upstream/downstream)、向内/向外(inbound/outbound)

4. 总体操作——请求/应答、中介

二、符号惯例与一般语法(notational conversions and generic grammar)

1. 扩充BNF——name = definition,"literal",rule1 | rule2,(rule1

rule2),*rule,[rule],N rule, #rule,; comment, implied *LWS

2. 基本规则

——OCTET,CHAR,UPALPHA,LOALPHA,ALPHA,DIGIT,CTL,CR,LF,SP,HT,<">

三、协议参数(protocol parameters)

1. HTTP版本——HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGIT

2. 统一资源标示符(URI)——统一资源定位器(URL)和统一资源名称(URN)的结合,

http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]

3. 日期/时间格式——Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by

RFC 1123,

Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036,

Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format

4. 字符集——本文档中的术语"字符集"指一种用一个或更多表格将一个八字节序列

转换成一个字符序列的方法,

charset=token

失踪字符集

5. 内容编码——内容编码主要用来允许文档压缩(信源编码)