?? http11.txt
字號:
HTTP Working Group R. Fielding, UC Irvine
INTERNET-DRAFT J. Gettys, DEC
<draft-ietf-http-v11-spec-07> J. C. Mogul, DEC
H. Frystyk, MIT/LCS
T. Berners-Lee, MIT/LCS
Expires February 12, 1997 August 12, 1996
Hypertext Transfer Protocol -- HTTP/1.1
Status of this Memo
This document is an Internet-Draft. Internet-Drafts are working
documents of the Internet Engineering Task Force (IETF), its areas, and
its working groups. Note that other groups may also distribute working
documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or made obsolete by other documents at any
time. It is inappropriate to use Internet-Drafts as reference material
or to cite them other than as "work in progress".
To learn the current status of any Internet-Draft, please check the
"1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
ftp.isi.edu (US West Coast).
Distribution of this document is unlimited. Please send comments to the
HTTP working group at <http-wg@cuckoo.hpl.hp.com>. Discussions of the
working group are archived at
<URL:http://www.ics.uci.edu/pub/ietf/http/>. General discussions about
HTTP and the applications which use HTTP should take place on the <www-
talk@w3.org> mailing list.
Abstract
The Hypertext Transfer Protocol (HTTP) is an application-level protocol
for distributed, collaborative, hypermedia information systems. It is a
generic, stateless, object-oriented protocol which can be used for many
tasks, such as name servers and distributed object management systems,
through extension of its request methods. 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".
Fielding, et al [Page 1]
Table of Contents
HYPERTEXT TRANSFER PROTOCOL -- HTTP/1.1....................1
Status of this Memo........................................1
Abstract...................................................1
Table of Contents..........................................2
1 Introduction.............................................8
1.1 Purpose ..............................................8
1.2 Requirements .........................................8
1.3 Terminology ..........................................9
1.4 Overall Operation ...................................12
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 ........................18
3.2.1 General Syntax ...................................18
3.2.2 http URL .........................................19
3.2.3 URI Comparison ...................................20
3.3 Date/Time Formats ...................................20
3.3.1 Full Date ........................................20
3.3.2 Delta Seconds ....................................21
3.4 Character Sets ......................................22
3.5 Content Codings .....................................22
3.6 Transfer Codings ....................................23
3.7 Media Types .........................................25
3.7.1 Canonicalization and Text Defaults ...............25
3.7.2 Multipart Types ..................................26
3.8 Product Tokens ......................................27
3.9 Quality Values ......................................27
3.10 Language Tags ......................................28
3.11 Entity Tags ........................................28
3.12 Range Units ........................................29
4 HTTP Message............................................29
4.1 Message Types .......................................29
4.2 Message Headers .....................................30
4.3 Message Body ........................................31
4.4 Message Length ......................................31
4.5 General Header Fields ...............................32
Fielding, et al [Page 2]
INTERNET-DRAFT HTTP/1.1 Monday, August 12, 1996
5 Request.................................................33
5.1 Request-Line ........................................33
5.1.1 Method ...........................................33
5.1.2 Request-URI ......................................34
5.2 The Resource Identified by a Request ................35
5.3 Request Header Fields ...............................36
6 Response................................................37
6.1 Status-Line .........................................37
6.1.1 Status Code and Reason Phrase ....................37
6.2 Response Header Fields ..............................39
7 Entity..................................................39
7.1 Entity Header Fields ................................40
7.2 Entity Body .........................................40
7.2.1 Type .............................................40
7.2.2 Length ...........................................41
8 Connections.............................................41
8.1 Persistent Connections ..............................41
8.1.1 Purpose ..........................................41
8.1.2 Overall Operation ................................42
8.1.3 Proxy Servers ....................................43
8.1.4 Practical Considerations .........................43
8.2 Message Transmission Requirements ...................44
9 Method Definitions......................................46
9.1 Safe and Idempotent Methods .........................46
9.1.1 Safe Methods .....................................46
9.1.2 Idempotent Methods ...............................46
9.2 OPTIONS .............................................47
9.3 GET .................................................47
9.4 HEAD ................................................48
9.5 POST ................................................48
9.6 PUT .................................................49
9.7 DELETE ..............................................50
9.8 TRACE ...............................................50
10 Status Code Definitions................................51
10.1 Informational 1xx ..................................51
10.1.1 100 Continue ....................................51
10.1.2 101 Switching Protocols .........................51
10.2 Successful 2xx .....................................52
10.2.1 200 OK ..........................................52
10.2.2 201 Created .....................................52
10.2.3 202 Accepted ....................................52
10.2.4 203 Non-Authoritative Information ...............53
10.2.5 204 No Content ..................................53
10.2.6 205 Reset Content ...............................53
10.2.7 206 Partial Content .............................53
10.3 Redirection 3xx ....................................54
Fielding, et al [Page 3]
INTERNET-DRAFT HTTP/1.1 Monday, August 12, 1996
10.3.1 300 Multiple Choices ............................54
10.3.2 301 Moved Permanently ...........................54
10.3.3 302 Moved Temporarily ...........................55
10.3.4 303 See Other ...................................55
10.3.5 304 Not Modified ................................56
10.3.6 305 Use Proxy ...................................56
10.4 Client Error 4xx ...................................56
10.4.1 400 Bad Request .................................57
10.4.2 401 Unauthorized ................................57
10.4.3 402 Payment Required ............................57
10.4.4 403 Forbidden ...................................57
10.4.5 404 Not Found ...................................57
10.4.6 405 Method Not Allowed ..........................58
10.4.7 406 Not Acceptable ..............................58
10.4.8 407 Proxy Authentication Required ...............58
10.4.9 408 Request Timeout .............................59
10.4.10 409 Conflict ...................................59
10.4.11 410 Gone .......................................59
10.4.12 411 Length Required ............................59
10.4.13 412 Precondition Failed ........................60
10.4.14 413 Request Entity Too Large ...................60
10.4.15 414 Request-URI Too Long .......................60
10.4.16 415 Unsupported Media Type .....................60
10.5 Server Error 5xx ...................................60
10.5.1 500 Internal Server Error .......................61
10.5.2 501 Not Implemented .............................61
10.5.3 502 Bad Gateway .................................61
10.5.4 503 Service Unavailable .........................61
10.5.5 504 Gateway Timeout .............................61
10.5.6 505 HTTP Version Not Supported ..................61
11 Access Authentication..................................62
11.1 Basic Authentication Scheme ........................63
11.2 Digest Authentication Scheme .......................64
12 Content Negotiation....................................64
12.1 Server-driven Negotiation ..........................65
12.2 Agent-driven Negotiation ...........................66
12.3 Transparent Negotiation ............................66
13 Caching in HTTP........................................67
13.1.1 Cache Correctness ...............................68
13.1.2 Warnings ........................................69
13.1.3 Cache-control Mechanisms ........................70
13.1.4 Explicit User Agent Warnings ....................70
13.1.5 Exceptions to the Rules and Warnings ............70
13.1.6 Client-controlled Behavior ......................71
13.2 Expiration Model ...................................71
13.2.1 Server-Specified Expiration .....................71
13.2.2 Heuristic Expiration ............................72
13.2.3 Age Calculations ................................72
Fielding, et al [Page 4]
INTERNET-DRAFT HTTP/1.1 Monday, August 12, 1996
13.2.4 Expiration Calculations .........................75
13.2.5 Disambiguating Expiration Values ................75
13.2.6 Disambiguating Multiple Responses ...............76
13.3 Validation Model ...................................77
13.3.1 Last-modified Dates .............................77
13.3.2 Entity Tag Cache Validators .....................78
13.3.3 Weak and Strong Validators ......................78
13.3.4 Rules for When to Use Entity Tags and Last-modified Dates
.......................................................80
13.3.5 Non-validating Conditionals .....................81
13.4 Response Cachability ...............................82
13.5 Constructing Responses From Caches .................82
13.5.1 End-to-end and Hop-by-hop Headers ...............83
13.5.2 Non-modifiable Headers ..........................83
13.5.3 Combining Headers ...............................84
13.5.4 Combining Byte Ranges ...........................84
13.6 Caching Negotiated Responses .......................85
13.7 Shared and Non-Shared Caches .......................86
13.8 Errors or Incomplete Response Cache Behavior .......86
13.9 Side Effects of GET and HEAD .......................86
13.10 Invalidation After Updates or Deletions ...........87
13.11 Write-Through Mandatory ...........................87
13.12 Cache Replacement .................................88
13.13 History Lists .....................................88
14 Header Field Definitions...............................89
14.1 Accept .............................................89
14.2 Accept-Charset .....................................91
14.3 Accept-Encoding ....................................91
14.4 Accept-Language ....................................92
14.5 Accept-Ranges ......................................93
14.6 Age ................................................93
14.7 Allow ..............................................94
14.8 Authorization ......................................94
14.9 Cache-Control ......................................95
14.9.1What is Cachable .................................96
14.9.1 What May be Stored by Caches ....................97
14.9.2 Modifications of the Basic Expiration Mechanism .98
14.9.3 Cache Revalidation and Reload Controls ..........99
14.9.4 No-Transform Directive .........................101
14.9.5 Cache Control Extensions .......................101
14.10 Connection .......................................102
14.11 Content-Base .....................................103
14.12 Content-Encoding .................................103
14.13 Content-Language .................................104
14.14 Content-Length ...................................104
14.15 Content-Location .................................105
14.16 Content-MD5 ......................................106
14.17 Content-Range ....................................107
14.18 Content-Type .....................................108
14.19 Date .............................................109
Fielding, et al [Page 5]
INTERNET-DRAFT HTTP/1.1 Monday, August 12, 1996
14.20 ETag .............................................109
14.21 Expires ..........................................110
14.22 From .............................................111
14.23 Host .............................................111
14.24 If-Modified-Since ................................112
14.25 If-Match .........................................113
14.26 If-None-Match ....................................114
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -