没有合适的资源?快使用搜索试试~ 我知道了~
首页RFC 2616 Hypertext Transfer Protocol -- HTTP/1.1
资源详情
资源评论
资源推荐
Fielding, et al. Standards Track [Page 1]
Network Working Group R. Fielding
Request for Comments: 2616 UC Irvine
Obsoletes: 2068 J. Gettys
Category: Standards Track Compaq/W3C
J. Mogul
Compaq
H. Frystyk
W3C/MIT
L. Masinter
Xerox
P. Leach
Microsoft
T. Berners-Lee
W3C/MIT
June 1999
Hypertext Transfer Protocol -- HTTP/1.1
Status of this Memo
This document specifies an Internet standards track protocol for the Internet community, and requests
discussion and suggestions for improvements. Please refer to the current edition of the “Internet Official
Protocol Standards” (STD 1) for the standardization state and status of this protocol. Distribution of this memo
is unlimited.
Copyright Notice
Copyright © The Internet Society (1999). All Rights Reserved.
Abstract
The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative,
hypermedia information systems. It is a generic, stateless, protocol which can be used for many tasks beyond
its use for hypertext, such as name servers and distributed object management systems, through extension of
its request methods, error codes and headers [47]. A feature of HTTP is the typing and negotiation of data
representation, allowing systems to be built independently of the data being transferred.
HTTP has been in use by the World-Wide Web global information initiative since 1990. This specification
defines the protocol referred to as "HTTP/1.1", and is an update to RFC 2068 [33].
RFC 2616 HTTP/1.1 June 1999
Fielding, et al. Standards Track [Page 2]
Table of Contents
1 Introduction...............................................................................................................................................................9
1.1 Purpose...................................................................................................................................................................9
1.2 Requirements......................................................................................................................................................... 9
1.3 Terminology...........................................................................................................................................................9
1.4 Overall Operation................................................................................................................................................ 11
2 Notational Conventions and Generic Grammar.................................................................................................14
2.1 Augmented BNF..................................................................................................................................................14
2.2 Basic Rules.......................................................................................................................................................... 15
3 Protocol Parameters...............................................................................................................................................17
3.1 HTTP Version......................................................................................................................................................17
3.2 Uniform Resource Identifiers..............................................................................................................................17
3.2.1 General Syntax................................................................................................................................................17
3.2.2 http URL.........................................................................................................................................................18
3.2.3 URI Comparison.............................................................................................................................................18
3.3 Date/Time Formats.............................................................................................................................................. 18
3.3.1 Full Date......................................................................................................................................................... 18
3.3.2 Delta Seconds................................................................................................................................................. 19
3.4 Character Sets......................................................................................................................................................19
3.4.1 Missing Charset.............................................................................................................................................. 20
3.5 Content Codings.................................................................................................................................................. 20
3.6 Transfer Codings................................................................................................................................................. 21
3.6.1 Chunked Transfer Coding.............................................................................................................................. 21
3.7 Media Types........................................................................................................................................................ 22
3.7.1 Canonicalization and Text Defaults...............................................................................................................23
3.7.2 Multipart Types.............................................................................................................................................. 23
3.8 Product Tokens....................................................................................................................................................24
3.9 Quality Values..................................................................................................................................................... 24
3.10 Language Tags...................................................................................................................................................24
3.11 Entity Tags.........................................................................................................................................................25
3.12 Range Units....................................................................................................................................................... 25
4 HTTP Message........................................................................................................................................................26
4.1 Message Types.....................................................................................................................................................26
4.2 Message Headers................................................................................................................................................. 26
4.3 Message Body......................................................................................................................................................27
4.4 Message Length...................................................................................................................................................27
4.5 General Header Fields.........................................................................................................................................28
5 Request.....................................................................................................................................................................29
5.1 Request-Line........................................................................................................................................................ 29
RFC 2616 HTTP/1.1 June 1999
Fielding, et al. Standards Track [Page 3]
5.1.1 Method............................................................................................................................................................ 29
5.1.2 Request-URI....................................................................................................................................................29
5.2 The Resource Identified by a Request................................................................................................................30
5.3 Request Header Fields.........................................................................................................................................31
6 Response...................................................................................................................................................................32
6.1 Status-Line........................................................................................................................................................... 32
6.1.1 Status Code and Reason Phrase.....................................................................................................................32
6.2 Response Header Fields...................................................................................................................................... 34
7 Entity........................................................................................................................................................................35
7.1 Entity Header Fields............................................................................................................................................35
7.2 Entity Body..........................................................................................................................................................35
7.2.1 Type................................................................................................................................................................ 35
7.2.2 Entity Length.................................................................................................................................................. 36
8 Connections..............................................................................................................................................................37
8.1 Persistent Connections.........................................................................................................................................37
8.1.1 Purpose............................................................................................................................................................37
8.1.2 Overall Operation........................................................................................................................................... 37
8.1.2.1 Negotiation...................................................................................................................................................37
8.1.2.2 Pipelining..................................................................................................................................................... 38
8.1.3 Proxy Servers..................................................................................................................................................38
8.1.4 Practical Considerations................................................................................................................................. 38
8.2 Message Transmission Requirements................................................................................................................. 39
8.2.1 Persistent Connections and Flow Control......................................................................................................39
8.2.2 Monitoring Connections for Error Status Messages......................................................................................39
8.2.3 Use of the 100 (Continue) Status...................................................................................................................39
8.2.4 Client Behavior if Server Prematurely Closes Connection............................................................................40
9 Method Definitions................................................................................................................................................. 41
9.1 Safe and Idempotent Methods.............................................................................................................................41
9.1.1 Safe Methods.................................................................................................................................................. 41
9.1.2 Idempotent Methods.......................................................................................................................................41
9.2 OPTIONS.............................................................................................................................................................41
9.3 GET......................................................................................................................................................................42
9.4 HEAD...................................................................................................................................................................42
9.5 POST....................................................................................................................................................................42
9.6 PUT...................................................................................................................................................................... 43
9.7 DELETE...............................................................................................................................................................44
9.8 TRACE.................................................................................................................................................................44
9.9 CONNECT...........................................................................................................................................................44
10 Status Code Definitions........................................................................................................................................45
10.1 Informational 1xx.............................................................................................................................................. 45
10.1.1 100 Continue.................................................................................................................................................45
10.1.2 101 Switching Protocols...............................................................................................................................45
RFC 2616 HTTP/1.1 June 1999
Fielding, et al. Standards Track [Page 4]
10.2 Successful 2xx................................................................................................................................................... 45
10.2.1 200 OK..........................................................................................................................................................45
10.2.2 201 Created...................................................................................................................................................45
10.2.3 202 Accepted................................................................................................................................................ 46
10.2.4 203 Non-Authoritative Information............................................................................................................. 46
10.2.5 204 No Content............................................................................................................................................ 46
10.2.6 205 Reset Content........................................................................................................................................ 46
10.2.7 206 Partial Content.......................................................................................................................................46
10.3 Redirection 3xx..................................................................................................................................................47
10.3.1 300 Multiple Choices................................................................................................................................... 47
10.3.2 301 Moved Permanently.............................................................................................................................. 47
10.3.3 302 Found.....................................................................................................................................................48
10.3.4 303 See Other...............................................................................................................................................48
10.3.5 304 Not Modified.........................................................................................................................................48
10.3.6 305 Use Proxy.............................................................................................................................................. 49
10.3.7 306 (Unused)................................................................................................................................................ 49
10.3.8 307 Temporary Redirect...............................................................................................................................49
10.4 Client Error 4xx.................................................................................................................................................49
10.4.1 400 Bad Request...........................................................................................................................................49
10.4.2 401 Unauthorized..........................................................................................................................................49
10.4.3 402 Payment Required................................................................................................................................. 50
10.4.4 403 Forbidden...............................................................................................................................................50
10.4.5 404 Not Found..............................................................................................................................................50
10.4.6 405 Method Not Allowed............................................................................................................................ 50
10.4.7 406 Not Acceptable......................................................................................................................................50
10.4.8 407 Proxy Authentication Required.............................................................................................................50
10.4.9 408 Request Timeout....................................................................................................................................50
10.4.10 409 Conflict................................................................................................................................................ 51
10.4.11 410 Gone.....................................................................................................................................................51
10.4.12 411 Length Required..................................................................................................................................51
10.4.13 412 Precondition Failed..............................................................................................................................51
10.4.14 413 Request Entity Too Large...................................................................................................................51
10.4.15 414 Request-URI Too Long.......................................................................................................................51
10.4.16 415 Unsupported Media Type....................................................................................................................52
10.4.17 416 Requested Range Not Satisfiable........................................................................................................52
10.4.18 417 Expectation Failed...............................................................................................................................52
10.5 Server Error 5xx................................................................................................................................................52
10.5.1 500 Internal Server Error............................................................................................................................. 52
10.5.2 501 Not Implemented...................................................................................................................................52
10.5.3 502 Bad Gateway......................................................................................................................................... 52
10.5.4 503 Service Unavailable...............................................................................................................................52
10.5.5 504 Gateway Timeout.................................................................................................................................. 52
10.5.6 505 HTTP Version Not Supported.............................................................................................................. 53
11 Access Authentication.......................................................................................................................................... 54
12 Content Negotiation..............................................................................................................................................55
12.1 Server-driven Negotiation................................................................................................................................. 55
12.2 Agent-driven Negotiation.................................................................................................................................. 55
12.3 Transparent Negotiation.................................................................................................................................... 56
13 Caching in HTTP................................................................................................................................................. 57
RFC 2616 HTTP/1.1 June 1999
Fielding, et al. Standards Track [Page 5]
13.1 ............................................................................................................................................................................57
13.1.1 Cache Correctness........................................................................................................................................ 57
13.1.2 Warnings....................................................................................................................................................... 58
13.1.3 Cache-control Mechanisms.......................................................................................................................... 58
13.1.4 Explicit User Agent Warnings..................................................................................................................... 58
13.1.5 Exceptions to the Rules and Warnings........................................................................................................59
13.1.6 Client-controlled Behavior........................................................................................................................... 59
13.2 Expiration Model...............................................................................................................................................59
13.2.1 Server-Specified Expiration..........................................................................................................................59
13.2.2 Heuristic Expiration......................................................................................................................................60
13.2.3 Age Calculations...........................................................................................................................................60
13.2.4 Expiration Calculations................................................................................................................................ 62
13.2.5 Disambiguating Expiration Values...............................................................................................................62
13.2.6 Disambiguating Multiple Responses............................................................................................................62
13.3 Validation Model...............................................................................................................................................63
13.3.1 Last-Modified Dates.....................................................................................................................................63
13.3.2 Entity Tag Cache Validators........................................................................................................................63
13.3.3 Weak and Strong Validators........................................................................................................................ 64
13.3.4 Rules for When to Use Entity Tags and Last-Modified Dates....................................................................65
13.3.5 Non-validating Conditionals.........................................................................................................................66
13.4 Response Cacheability.......................................................................................................................................66
13.5 Constructing Responses From Caches..............................................................................................................67
13.5.1 End-to-end and Hop-by-hop Headers.......................................................................................................... 67
13.5.2 Non-modifiable Headers...............................................................................................................................67
13.5.3 Combining Headers...................................................................................................................................... 68
13.5.4 Combining Byte Ranges...............................................................................................................................68
13.6 Caching Negotiated Responses......................................................................................................................... 69
13.7 Shared and Non-Shared Caches........................................................................................................................69
13.8 Errors or Incomplete Response Cache Behavior..............................................................................................70
13.9 Side Effects of GET and HEAD.......................................................................................................................70
13.10 Invalidation After Updates or Deletions.........................................................................................................70
13.11 Write-Through Mandatory...............................................................................................................................71
13.12 Cache Replacement......................................................................................................................................... 71
13.13 History Lists.....................................................................................................................................................71
14 Header Field Definitions......................................................................................................................................72
14.1 Accept................................................................................................................................................................ 72
14.2 Accept-Charset...................................................................................................................................................73
14.3 Accept-Encoding................................................................................................................................................73
14.4 Accept-Language............................................................................................................................................... 74
14.5 Accept-Ranges................................................................................................................................................... 75
14.6 Age.....................................................................................................................................................................75
14.7 Allow..................................................................................................................................................................76
14.8 Authorization..................................................................................................................................................... 76
14.9 Cache-Control.................................................................................................................................................... 77
剩余128页未读,继续阅读
jindong_hu
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- RTL8188FU-Linux-v5.7.4.2-36687.20200602.tar(20765).gz
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
- SPC统计方法基础知识.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1