< draft-ietf-http-v11-spec-05.txt   draft-ietf-http-v11-spec-06.txt >
HTTP Working Group R. Fielding, UC Irvine HTTP Working Group R. Fielding, UC Irvine
INTERNET-DRAFT J. Gettys, DEC INTERNET-DRAFT J. Gettys, DEC
<draft-ietf-http-v11-spec-05> J. C. Mogul, DEC <draft-ietf-http-v11-spec-06> J. C. Mogul, DEC
H. Frystyk, MIT/LCS H. Frystyk, MIT/LCS
T. Berners-Lee, MIT/LCS T. Berners-Lee, MIT/LCS
Expires December 7, 1996 June 7, 1996 Expires January 4, 1996 July 4, 1996
Hypertext Transfer Protocol -- HTTP/1.1 Hypertext Transfer Protocol -- HTTP/1.1
Status of this Memo Status of this Memo
This document is an Internet-Draft. Internet-Drafts are working This document is an Internet-Draft. Internet-Drafts are working
documents of the Internet Engineering Task Force (IETF), its areas, and documents of the Internet Engineering Task Force (IETF), its areas, and
its working groups. Note that other groups may also distribute working its working groups. Note that other groups may also distribute working
documents as Internet-Drafts. documents as Internet-Drafts.
skipping to change at page 3, line ? skipping to change at page 2, line 7
through extension of its request methods. A feature of HTTP is the through extension of its request methods. A feature of HTTP is the
typing and negotiation of data representation, allowing systems to be typing and negotiation of data representation, allowing systems to be
built independently of the data being transferred. built independently of the data being transferred.
HTTP has been in use by the World-Wide Web global information initiative HTTP has been in use by the World-Wide Web global information initiative
since 1990. This specification defines the protocol referred to as since 1990. This specification defines the protocol referred to as
"HTTP/1.1". "HTTP/1.1".
Table of Contents Table of Contents
HYPERTEXT TRANSFER PROTOCOL -- HTTP/1.1................................1 HYPERTEXT TRANSFER PROTOCOL -- HTTP/1.1....................1
1 Introduction.........................................................7 Status of this Memo........................................1
1.1 Purpose ..........................................................7
1.2 Requirements .....................................................7
1.3 Terminology ......................................................8
1.4 Overall Operation ...............................................11
2 Notational Conventions and Generic Grammar..........................13 Abstract...................................................1
2.1 Augmented BNF ...................................................13
2.2 Basic Rules .....................................................15
3 Protocol Parameters.................................................16 Table of Contents..........................................2
3.1 HTTP Version ....................................................16
3.2 Uniform Resource Identifiers ....................................17
3.3 Date/Time Formats ...............................................19
3.4 Character Sets ..................................................21
3.5 Content Codings .................................................22
3.6 Transfer Codings ................................................23
3.7 Media Types .....................................................24
3.8 Product Tokens ..................................................26
3.9 Quality Values ..................................................26
3.10 Language Tags ..................................................27
3.11 Entity Tags ....................................................27
3.12 Range Units ....................................................28
4 HTTP Message........................................................28 1 Introduction.............................................8
4.1 Message Types ...................................................28 1.1 Purpose ..............................................8
4.2 Message Headers .................................................29 1.2 Requirements .........................................8
4.3 Message Body ....................................................30 1.3 Terminology ..........................................9
4.4 Message Length ..................................................30 1.4 Overall Operation ...................................12
4.5 General Header Fields ...........................................31
5 Request.............................................................32 2 Notational Conventions and Generic Grammar..............14
5.1 Request-Line ....................................................32 2.1 Augmented BNF .......................................14
5.2 The Resource Identified by a Request ............................34 2.2 Basic Rules .........................................15
5.3 Request Header Fields ...........................................35
6 Response............................................................35 3 Protocol Parameters.....................................17
6.1 Status-Line .....................................................36 3.1 HTTP Version ........................................17
6.2 Response Header Fields ..........................................38 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
7 Entity..............................................................38 4 HTTP Message............................................29
7.1 Entity Header Fields ............................................38 4.1 Message Types .......................................29
7.2 Entity Body .....................................................39 4.2 Message Headers .....................................30
4.3 Message Body ........................................31
4.4 Message Length ......................................31
4.5 General Header Fields ...............................32
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
8 Connections.........................................................40 6 Response................................................37
8.1 Persistent Connections ..........................................40 6.1 Status-Line .........................................37
8.2 Message Transmission Requirements ...............................43 6.1.1 Status Code and Reason Phrase ....................37
6.2 Response Header Fields ..............................39
9 Method Definitions..................................................44 7 Entity..................................................39
9.1 Safe and Idempotent Methods .....................................45 7.1 Entity Header Fields ................................40
9.2 OPTIONS .........................................................45 7.2 Entity Body .........................................40
9.3 GET .............................................................46 7.2.1 Type .............................................40
9.4 HEAD ............................................................46 7.2.2 Length ...........................................41
9.5 POST ............................................................47
9.6 PUT .............................................................48
9.7 DELETE ..........................................................49
9.8 TRACE ...........................................................49
10 Status Code Definitions............................................49 8 Connections.............................................41
10.1 Informational 1xx ..............................................50 8.1 Persistent Connections ..............................41
10.2 Successful 2xx .................................................50 8.1.1 Purpose ..........................................41
10.3 Redirection 3xx ................................................52 8.1.2 Overall Operation ................................42
10.4 Client Error 4xx ...............................................55 8.1.3 Proxy Servers ....................................43
10.5 Server Error 5xx ...............................................59 8.1.4 Practical Considerations .........................43
8.2 Message Transmission Requirements ...................44
11 Access Authentication..............................................60 9 Method Definitions......................................46
11.1 Basic Authentication Scheme ....................................62 9.1 Safe and Idempotent Methods .........................46
11.2 Digest Authentication Scheme ...................................62 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
12 Content Negotiation................................................63 10 Status Code Definitions................................51
12.1 Server-driven Negotiation ......................................63 10.1 Informational 1xx ..................................51
12.2 Agent-driven Negotiation .......................................64 10.1.1 100 Continue ....................................51
12.3 Transparent Negotiation ........................................65 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
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
13 Caching in HTTP....................................................65 11 Access Authentication..................................62
13.2 Expiration Model ...............................................70 11.1 Basic Authentication Scheme ........................63
13.3 Validation Model ...............................................75 11.2 Digest Authentication Scheme .......................64
13.4 Response Cachability ...........................................80
13.5 Constructing Responses From Caches .............................81
13.6 Caching Negotiated Responses ...................................83
13.7 Shared and Non-Shared Caches ...................................84
13.8 Errors or Incomplete Response Cache Behavior ...................84
13.9 Side Effects of GET and HEAD ...................................85
13.10 Invalidation After Updates or Deletions .......................85
13.11 Write-Through Mandatory .......................................86
13.12 Cache Replacement .............................................86
13.13 History Lists .................................................86
14 Header Field Definitions...........................................87 12 Content Negotiation....................................64
14.1 Accept .........................................................87 12.1 Server-driven Negotiation ..........................65
14.2 Accept-Charset .................................................89 12.2 Agent-driven Negotiation ...........................66
14.3 Accept-Encoding ................................................89 12.3 Transparent Negotiation ............................66
14.4 Accept-Language ................................................90
14.5 Accept-Ranges ..................................................91
14.6 Age ............................................................91
14.7 Allow ..........................................................92
14.8 Authorization ..................................................92
14.9 Cache-Control ..................................................93
14.10 Connection ...................................................100
14.11 Content-Base .................................................101
14.12 Content-Encoding .............................................101
14.13 Content-Language .............................................102
14.14 Content-Length ...............................................102
14.15 Content-Location .............................................103
14.16 Content-MD5 ..................................................104
14.17 Content-Range ................................................105
14.18 Content-Type .................................................107
14.19 Date .........................................................107
14.20 ETag .........................................................108
14.21 Expires ......................................................108
14.22 From .........................................................109
14.23 Host .........................................................109
14.24 If-Modified-Since ............................................110
14.25 If-Match .....................................................111
14.26 If-None-Match ................................................112
14.27 If-Range .....................................................113
14.28 If-Unmodified-Since ..........................................114
14.29 Last-Modified ................................................114
14.30 Location .....................................................115
14.31 Max-Forwards .................................................115
14.32 Pragma .......................................................116
14.33 Proxy-Authenticate ...........................................117
14.34 Proxy-Authorization ..........................................117
14.35 Public .......................................................117
14.36 Range ........................................................118
14.37 Referer ......................................................120
14.38 Retry-After ..................................................121
14.39 Server .......................................................121
14.40 Transfer-Encoding ............................................122
14.41 Upgrade ......................................................122
14.42 User-Agent ...................................................123
14.43 Vary .........................................................123
14.44 Via ..........................................................125
14.45 Warning ......................................................126
14.46 WWW-Authenticate .............................................128
15 Security Considerations...........................................128 13 Caching in HTTP........................................67
15.1 Authentication of Clients .....................................128 13.1.1 Cache Correctness ...............................68
15.2 Offering a Choice of Authentication Schemes ...................129 13.1.2 Warnings ........................................69
15.3 Abuse of Server Log Information ...............................130 13.1.3 Cache-control Mechanisms ........................70
15.4 Transfer of Sensitive Information .............................130 13.1.4 Explicit User Agent Warnings ....................70
15.5 Attacks Based On File and Path Names ..........................131 13.1.5 Exceptions to the Rules and Warnings ............70
15.6 Personal Information ..........................................131 13.1.6 Client-controlled Behavior ......................71
15.7 Privacy Issues Connected to Accept Headers ....................132 13.2 Expiration Model ...................................71
15.8 DNS Spoofing ..................................................132 13.2.1 Server-Specified Expiration .....................71
15.9 Location Headers and Spoofing .................................133 13.2.2 Heuristic Expiration ............................72
16 Acknowledgments...................................................133 13.2.3 Age Calculations ................................72
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
17 References........................................................134 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
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
14.27 If-Range .........................................115
14.28 If-Unmodified-Since ..............................116
14.29 Last-Modified ....................................116
14.30 Location .........................................117
14.31 Max-Forwards .....................................117
14.32 Pragma ...........................................118
14.33 Proxy-Authenticate ...............................118
14.34 Proxy-Authorization ..............................119
14.35 Public ...........................................119
14.36 Range ............................................120
14.36.1 Byte Ranges ...................................120
14.36.2 Range Retrieval Requests ......................121
14.37 Referer ..........................................122
14.38 Retry-After ......................................123
14.39 Server ...........................................123
14.40 Transfer-Encoding ................................124
14.41 Upgrade ..........................................124
14.42 User-Agent .......................................125
14.43 Vary .............................................125
14.44 Via ..............................................127
14.45 Warning ..........................................128
14.46 WWW-Authenticate .................................130
18 Authors' Addresses................................................138 15 Security Considerations...............................130
15.1 Authentication of Clients .........................130
15.2 Offering a Choice of Authentication Schemes .......131
15.3 Abuse of Server Log Information ...................132
15.4 Transfer of Sensitive Information .................132
15.5 Attacks Based On File and Path Names ..............133
15.6 Personal Information ..............................133
15.7 Privacy Issues Connected to Accept Headers ........134
15.8 DNS Spoofing ......................................134
15.9 Location Headers and Spoofing .....................135
19 Appendices........................................................139 16 Acknowledgments.......................................135
19.1 Internet Media Type message/http ..............................139
19.2 Internet Media Type multipart/byteranges ......................140 17 References............................................136
19.3 Tolerant Applications .........................................140
19.4 Differences Between HTTP Entities and RFC 1521 Entities .......141 18 Authors' Addresses....................................140
19.5 Changes from HTTP/1.0 .........................................144
19.6 Additional Features ...........................................145 19 Appendices............................................141
19.7 Compatibility with Previous Versions ..........................149 19.1 Internet Media Type message/http ..................141
19.8 Notes to the RFC Editor and IANA ..............................150 19.2 Internet Media Type multipart/byteranges ..........141
19.3 Tolerant Applications .............................142
19.4 Differences Between HTTP Entities and RFC 1521 Entities 143
19.4.1 Conversion to Canonical Form ...................143
19.4.2 Conversion of Date Formats .....................144
19.4.3 Introduction of Content-Encoding ...............144
19.4.4 No Content-Transfer-Encoding ...................144
19.4.5 HTTP Header Fields in Multipart Body-Parts .....144
19.4.6 Introduction of Transfer-Encoding ..............144
19.4.7 MIME-Version ...................................145
19.5 Changes from HTTP/1.0 .............................145
19.5.1 Changes to Simplify Multi-homed Web Servers and Conserve IP
Addresses .............................................145
19.6 Additional Features ...............................146
19.6.1 Additional Request Methods .....................146
19.6.2 Additional Header Field Definitions ............148
19.7 Compatibility with Previous Versions ..............150
19.7.1 Compatibility with HTTP/1.0 Persistent Connections151
19.8 Notes to the RFC Editor and IANA ..................152
19.8.1 Charset Registry ...............................152
19.8.2 Content-coding Values ..........................153
19.8.3 New Media Types Registered .....................153
19.8.4 Possible Merge With Digest Authentication Draft 153
1 Introduction 1 Introduction
1.1 Purpose 1.1 Purpose
The Hypertext Transfer Protocol (HTTP) is an application-level protocol The Hypertext Transfer Protocol (HTTP) is an application-level protocol
for distributed, collaborative, hypermedia information systems. HTTP has for distributed, collaborative, hypermedia information systems. HTTP has
been in use by the World-Wide Web global information initiative since been in use by the World-Wide Web global information initiative since
1990. The first version of HTTP, referred to as HTTP/0.9, was a simple 1990. The first version of HTTP, referred to as HTTP/0.9, was a simple
protocol for raw data transfer across the Internet. HTTP/1.0, as defined protocol for raw data transfer across the Internet. HTTP/1.0, as defined
by RFC 1945 [6], improved the protocol by allowing messages to be in the by RFC 1945 [6], improved the protocol by allowing messages to be in the
skipping to change at page 7, line 35 skipping to change at page 8, line 35
ensure reliable implementation of its features. ensure reliable implementation of its features.
Practical information systems require more functionality than simple Practical information systems require more functionality than simple
retrieval, including search, front-end update, and annotation. HTTP retrieval, including search, front-end update, and annotation. HTTP
allows an open-ended set of methods that indicate the purpose of a allows an open-ended set of methods that indicate the purpose of a
request. It builds on the discipline of reference provided by the request. It builds on the discipline of reference provided by the
Uniform Resource Identifier (URI) [3][20], as a location (URL) [4] or Uniform Resource Identifier (URI) [3][20], as a location (URL) [4] or
name (URN) , for indicating the resource to which a method is to be name (URN) , for indicating the resource to which a method is to be
applied. Messages are passed in a format similar to that used by applied. Messages are passed in a format similar to that used by
Internet mail as defined by the Multipurpose Internet Mail Extensions Internet mail as defined by the Multipurpose Internet Mail Extensions
(MIME) . (MIME).
HTTP is also used as a generic protocol for communication between user HTTP is also used as a generic protocol for communication between user
agents and proxies/gateways to other Internet systems, including those agents and proxies/gateways to other Internet systems, including those
supported by the SMTP [16], NNTP [13], FTP [18], Gopher [2], and WAIS supported by the SMTP [16], NNTP [13], FTP [18], Gopher [2], and WAIS
[10] protocols. In this way, HTTP allows basic hypermedia access to [10] protocols. In this way, HTTP allows basic hypermedia access to
resources available from diverse applications. resources available from diverse applications.
1.2 Requirements 1.2 Requirements
This specification uses the same words as RFC 1123 [8] for defining the This specification uses the same words as RFC 1123 [8] for defining the
skipping to change at page 13, line 37 skipping to change at page 14, line 35
more than one line. Certain basic rules are in uppercase, such as more than one line. Certain basic rules are in uppercase, such as
SP, LWS, HT, CRLF, DIGIT, ALPHA, etc. Angle brackets are used SP, LWS, HT, CRLF, DIGIT, ALPHA, etc. Angle brackets are used
within definitions whenever their presence will facilitate within definitions whenever their presence will facilitate
discerning the use of rule names. discerning the use of rule names.
"literal" "literal"
Quotation marks surround literal text. Unless stated otherwise, the Quotation marks surround literal text. Unless stated otherwise, the
text is case-insensitive. text is case-insensitive.
rule1 | rule2 rule1 | rule2
Elements separated by a bar ("|") are alternatives, e.g., "yes | Elements separated by a bar ("|") are alternatives, e.g.,
no" will accept yes or no. "yes | no" will accept yes or no.
(rule1 rule2) (rule1 rule2)
Elements enclosed in parentheses are treated as a single element. Elements enclosed in parentheses are treated as a single element.
Thus, "(elem (foo | bar) elem)" allows the token sequences Thus, "(elem (foo | bar) elem)" allows the token sequences
"elem foo elem" and "elem bar elem". "elem foo elem" and "elem bar elem".
*rule *rule
The character "*" preceding an element indicates repetition. The The character "*" preceding an element indicates repetition. The
full form is "<n>*<m>element" indicating at least <n> and at most full form is "<n>*<m>element" indicating at least <n> and at most
<m> occurrences of element. Default values are 0 and infinity so <m> occurrences of element. Default values are 0 and infinity so
skipping to change at page 17, line 35 skipping to change at page 18, line 23
before being forwarded; the proxy/gateway's response to that request before being forwarded; the proxy/gateway's response to that request
MUST be in the same major version as the request. MUST be in the same major version as the request.
Note: Converting between versions of HTTP may involve modification Note: Converting between versions of HTTP may involve modification
of header fields required or forbidden by the versions involved. of header fields required or forbidden by the versions involved.
3.2 Uniform Resource Identifiers 3.2 Uniform Resource Identifiers
URIs have been known by many names: WWW addresses, Universal Document URIs have been known by many names: WWW addresses, Universal Document
Identifiers, Universal Resource Identifiers , and finally the Identifiers, Universal Resource Identifiers , and finally the
combination of Uniform Resource Locators (URL) and Names (URN) . As far combination of Uniform Resource Locators (URL) and Names (URN). As far
as HTTP is concerned, Uniform Resource Identifiers are simply formatted as HTTP is concerned, Uniform Resource Identifiers are simply formatted
strings which identify--via name, location, or any other characteristic- strings which identify--via name, location, or any other characteristic-
-a resource. -a resource.
3.2.1 General Syntax 3.2.1 General Syntax
URIs in HTTP can be represented in absolute form or relative to some URIs in HTTP can be represented in absolute form or relative to some
known base URI, depending upon the context of their use. The two forms known base URI, depending upon the context of their use. The two forms
are differentiated by the fact that absolute URIs always begin with a are differentiated by the fact that absolute URIs always begin with a
scheme name followed by a colon. scheme name followed by a colon.
skipping to change at page 19, line 33 skipping to change at page 20, line 15
whenever possible (see RFC 1900 [24]). If the abs_path is not present in whenever possible (see RFC 1900 [24]). If the abs_path is not present in
the URL, it MUST be given as "/" when used as a Request-URI for a the URL, it MUST be given as "/" when used as a Request-URI for a
resource (section 5.1.2). resource (section 5.1.2).
3.2.3 URI Comparison 3.2.3 URI Comparison
When comparing two URIs to decide if they match or not, a client SHOULD When comparing two URIs to decide if they match or not, a client SHOULD
use a case-sensitive octet-by-octet comparison of the entire URIs, with use a case-sensitive octet-by-octet comparison of the entire URIs, with
these exceptions: these exceptions:
. A port that is empty or not given is equivalent to the default port o A port that is empty or not given is equivalent to the default port
for that URI; for that URI;
. Comparisons of host names MUST be case-insensitive;
. Comparisons of scheme names MUST be case-insensitive; o Comparisons of host names MUST be case-insensitive;
. An empty abs_path is equivalent to an abs_path of "/".
o Comparisons of scheme names MUST be case-insensitive;
o An empty abs_path is equivalent to an abs_path of "/".
Characters other than those in the "reserved" and "unsafe" sets (see Characters other than those in the "reserved" and "unsafe" sets (see
section 3.2) are equivalent to their ""%" HEX HEX" encodings. section 3.2) are equivalent to their ""%" HEX HEX" encodings.
For example, the following three URIs are equivalent: For example, the following three URIs are equivalent:
http://abc.com:80/~smith/home.html http://abc.com:80/~smith/home.html
http://ABC.com/%7Esmith/home.html http://ABC.com/%7Esmith/home.html
http://ABC.com:/%7esmith/home.html http://ABC.com:/%7esmith/home.html
3.3 Date/Time Formats 3.3 Date/Time Formats
skipping to change at page 20, line 10 skipping to change at page 20, line 45
3.3.1 Full Date 3.3.1 Full Date
HTTP applications have historically allowed three different formats for HTTP applications have historically allowed three different formats for
the representation of date/time stamps: the representation of date/time stamps:
Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 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 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 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
The first format is preferred as an Internet standard and represents a The first format is preferred as an Internet standard and represents a
fixed-length subset of that defined by RFC 1123 (an update to RFC 822 fixed-length subset of that defined by RFC 1123 (an update to RFC 822).
). The second format is in common use, but is based on the obsolete RFC The second format is in common use, but is based on the obsolete RFC
850 date format and lacks a four-digit year. HTTP/1.1 clients and 850 date format and lacks a four-digit year. HTTP/1.1 clients and
servers that parse the date value MUST accept all three formats (for servers that parse the date value MUST accept all three formats (for
compatibility with HTTP/1.0), though they MUST only generate the RFC compatibility with HTTP/1.0), though they MUST only generate the RFC
1123 format for representing HTTP-date values in header fields. 1123 format for representing HTTP-date values in header fields.
Note: Recipients of date values are encouraged to be robust in Note: Recipients of date values are encouraged to be robust in
accepting date values that may have been sent by non-HTTP accepting date values that may have been sent by non-HTTP
applications, as is sometimes the case when retrieving or posting applications, as is sometimes the case when retrieving or posting
messages via proxies/gateways to SMTP or NNTP. messages via proxies/gateways to SMTP or NNTP.
skipping to change at page 25, line 37 skipping to change at page 26, line 22
If an entity-body is encoded with a Content-Encoding, the underlying If an entity-body is encoded with a Content-Encoding, the underlying
data MUST be in a form defined above prior to being encoded. data MUST be in a form defined above prior to being encoded.
The "charset" parameter is used with some media types to define the The "charset" parameter is used with some media types to define the
character set (section 3.4) of the data. When no explicit charset character set (section 3.4) of the data. When no explicit charset
parameter is provided by the sender, media subtypes of the "text" type parameter is provided by the sender, media subtypes of the "text" type
are defined to have a default charset value of "ISO-8859-1" when are defined to have a default charset value of "ISO-8859-1" when
received via HTTP. Data in character sets other than "ISO-8859-1" or its received via HTTP. Data in character sets other than "ISO-8859-1" or its
subsets MUST be labeled with an appropriate charset value. subsets MUST be labeled with an appropriate charset value.
Some HTTP/1.0 software has interpreted a Content-Type header without
charset parameter incorrectly to mean "recipient should guess." Senders
wishing to defeat this behavior MAY include a charset parameter even
when the charset is ISO-8859-1 and SHOULD do so when it is known that it
will not confuse the recipient.
Unfortunately, some older HTTP/1.0 clients did not deal properly with an
explicit charset parameter. HTTP/1.1 recipients MUST respect the charset
label provided by the sender; and those user agents that have a
provision to "guess" a charset MUST use the charset from the content-
type field if they support that charset, rather than the recipient's
preference, when initially displaying a document.
3.7.2 Multipart Types 3.7.2 Multipart Types
MIME provides for a number of "multipart" types -- encapsulations of one MIME provides for a number of "multipart" types -- encapsulations of one
or more entities within a single message-body. All multipart types share or more entities within a single message-body. All multipart types share
a common syntax, as defined in section 7.2.1 of RFC 1521 [7], and MUST a common syntax, as defined in section 7.2.1 of RFC 1521 [7], and MUST
include a boundary parameter as part of the media type value. The include a boundary parameter as part of the media type value. The
message body is itself a protocol element and MUST therefore use only message body is itself a protocol element and MUST therefore use only
CRLF to represent line breaks between body-parts. Unlike in RFC 1521, CRLF to represent line breaks between body-parts. Unlike in RFC 1521,
the epilogue of any multipart message MUST be empty; HTTP applications the epilogue of any multipart message MUST be empty; HTTP applications
MUST NOT transmit the epilogue (even if the original multipart contains MUST NOT transmit the epilogue (even if the original multipart contains
skipping to change at page 28, line 16 skipping to change at page 29, line 16
An entity tag MUST be unique across all versions of all entities An entity tag MUST be unique across all versions of all entities
associated with a particular resource. A given entity tag value may be associated with a particular resource. A given entity tag value may be
used for entities obtained by requests on different URIs without used for entities obtained by requests on different URIs without
implying anything about the equivalence of those entities. implying anything about the equivalence of those entities.
3.12 Range Units 3.12 Range Units
HTTP/1.1 allows a client to request that only part (a range of) the 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 range response entity be included within the response. HTTP/1.1 uses range
units in the Range (section 14.36), and Content-Range (section 14.17) units in the Range (section 14.36) and Content-Range (section 14.17)
header fields. An entity may be broken down into subranges according to header fields. An entity may be broken down into subranges according to
various structural units. various structural units.
range-unit = bytes-unit | other-range-unit range-unit = bytes-unit | other-range-unit
bytes-unit = "bytes" bytes-unit = "bytes"
other-range-unit = token other-range-unit = token
The only range unit defined by HTTP/1.1 is "bytes". HTTP/1.1 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 implementations may ignore ranges specified using other units. HTTP/1.1
skipping to change at page 30, line 7 skipping to change at page 31, line 7
possible to combine the multiple header fields into one "field-name: possible to combine the multiple header fields into one "field-name:
field-value" pair, without changing the semantics of the message, by field-value" pair, without changing the semantics of the message, by
appending each subsequent field-value to the first, each separated by a appending each subsequent field-value to the first, each separated by a
comma. The order in which header fields with the same field-name are comma. The order in which header fields with the same field-name are
received is therefore significant to the interpretation of the combined received is therefore significant to the interpretation of the combined
field value, and thus a proxy MUST NOT change the order of these field field value, and thus a proxy MUST NOT change the order of these field
values when a message is forwarded. values when a message is forwarded.
4.3 Message Body 4.3 Message Body
The message-body (if any) of an HTTP message is used to carry the The message-body (if any) of an HTTP message is used to carry the
entity-body associated with the request or response. The message-body entity-body associated with the request or response. The message-body
differs from the entity-body only when a transfer coding has been differs from the entity-body only when a transfer coding has been
applied, as indicated by the Transfer-Encoding header field (section applied, as indicated by the Transfer-Encoding header field (section
14.40). 14.40).
message-body = entity-body message-body = entity-body
| <entity-body encoded as per Transfer-Encoding> | <entity-body encoded as per Transfer-Encoding>
Transfer-Encoding MUST be used to indicate any transfer codings applied Transfer-Encoding MUST be used to indicate any transfer codings applied
by an application to ensure safe and proper transfer of the message. by an application to ensure safe and proper transfer of the message.
skipping to change at page 30, line 41 skipping to change at page 31, line 41
message is dependent on both the request method and the response status message is dependent on both the request method and the response status
code (section 6.1.1). All responses to the HEAD request method MUST NOT code (section 6.1.1). All responses to the HEAD request method MUST NOT
include a message-body, even though the presence of entity-header fields include a message-body, even though the presence of entity-header fields
might lead one to believe they do. All 1xx (informational), 204 (no might lead one to believe they do. All 1xx (informational), 204 (no
content), and 304 (not modified) responses MUST NOT include a message- content), and 304 (not modified) responses MUST NOT include a message-
body. All other responses do include a message-body, although it may be body. All other responses do include a message-body, although it may be
of zero length. of zero length.
4.4 Message Length 4.4 Message Length
When a message-body is included with a message, the length of that body When a message-body is included with a message, the length of that body
is determined by one of the following (in order of precedence): is determined by one of the following (in order of precedence):
1. Any response message which MUST NOT include a message-body (such as 1. Any response message which MUST NOT include a message-body (such as
the 1xx, 204, and 304 responses and any response to a HEAD request) the 1xx, 204, and 304 responses and any response to a HEAD request)
is always terminated by the first empty line after the header fields, is always terminated by the first empty line after the header fields,
regardless of the entity-header fields present in the message. regardless of the entity-header fields present in the message.
2. If a Transfer-Encoding header field (section 14.40) is present and 2. If a Transfer-Encoding header field (section 14.40) is present and
indicates that the "chunked" transfer coding has been applied, then indicates that the "chunked" transfer coding has been applied, then
the length is defined by the chunked encoding (section 3.6). the length is defined by the chunked encoding (section 3.6).
3. If a Content-Length header field (section 14.14) is present, its 3. If a Content-Length header field (section 14.14) is present, its
value in bytes represents the length of the message-body. value in bytes represents the length of the message-body.
4. If the message uses the media type "multipart/byteranges", which is 4. If the message uses the media type "multipart/byteranges", which is
self-delimiting, then that defines the length. This Content-Type MUST self-delimiting, then that defines the length. This media type MUST
NOT be used unless the sender knows that the recipient can parse it; NOT be used unless the sender knows that the recipient can parse it;
the presence in a request of a Range header with multiple byte-range the presence in a request of a Range header with multiple byte-range
specifiers implies that the client can parse multipart/byteranges specifiers implies that the client can parse multipart/byteranges
responses. responses.
5. By the server closing the connection. (Closing the connection cannot 5. By the server closing the connection. (Closing the connection cannot
be used to indicate the end of a request body, since that would leave be used to indicate the end of a request body, since that would leave
no possibility for the server to send back a response.) no possibility for the server to send back a response.)
For compatibility with HTTP/1.0 applications, HTTP/1.1 requests For compatibility with HTTP/1.0 applications, HTTP/1.1 requests
containing a message-body MUST include a valid Content-Length header containing a message-body MUST include a valid Content-Length header
field unless the server is known to be HTTP/1.1 compliant. If a request field unless the server is known to be HTTP/1.1 compliant. If a request
contains a message-body and a Content-Length is not given, the server contains a message-body and a Content-Length is not given, the server
SHOULD respond with 400 (bad request) if it cannot determine the length SHOULD respond with 400 (bad request) if it cannot determine the length
of the message, or with 411 (length required) if it wishes to insist on of the message, or with 411 (length required) if it wishes to insist on
receiving a valid Content-Length. receiving a valid Content-Length.
skipping to change at page 34, line 34 skipping to change at page 35, line 34
interpret the request. Servers SHOULD respond to invalid Request-URIs interpret the request. Servers SHOULD respond to invalid Request-URIs
with an appropriate status code. with an appropriate status code.
In requests that they forward, proxies MUST NOT rewrite the "abs_path" In requests that they forward, proxies MUST NOT rewrite the "abs_path"
part of a Request-URI in any way except as noted above to replace a null part of a Request-URI in any way except as noted above to replace a null
abs_path with "*", no matter what the proxy does in its internal abs_path with "*", no matter what the proxy does in its internal
implementation. implementation.
Note: The "no rewrite" rule prevents the proxy from changing the Note: The "no rewrite" rule prevents the proxy from changing the
meaning of the request when the origin server is improperly using a meaning of the request when the origin server is improperly using a
non-reserved URL character for a reserved purpose, since it is not non-reserved URL character for a reserved purpose. Implementers
feasible to fix all CGI scripts (or script authors) use URI syntax should be aware that some pre-HTTP/1.1 proxies have been known to
correctly. Implementers should be aware that some pre-HTTP/1.1 rewrite the Request-URI.
proxies have been known to rewrite the Request-URI.
5.2 The Resource Identified by a Request 5.2 The Resource Identified by a Request
HTTP/1.1 origin servers SHOULD be aware that the exact resource HTTP/1.1 origin servers SHOULD be aware that the exact resource
identified by an Internet request is determined by examining both the identified by an Internet request is determined by examining both the
Request-URI and the Host header field. Request-URI and the Host header field.
An origin server that does not allow resources to differ by the An origin server that does not allow resources to differ by the
requested host MAY ignore the Host header field value. (But see section requested host MAY ignore the Host header field value. (But see section
19.5.1 for other requirements on Host support in HTTP/1.1.) 19.5.1 for other requirements on Host support in HTTP/1.1.)
An origin server that does differentiate resources based on the host An origin server that does differentiate resources based on the host
requested (sometimes referred to as virtual hosts or vanity hostnames) requested (sometimes referred to as virtual hosts or vanity hostnames)
MUST use the following rules for determining the requested resource on MUST use the following rules for determining the requested resource on
an HTTP/1.1 request: an HTTP/1.1 request:
1. If Request-URI is an absoluteURI, the host is part of the Request- 1. If Request-URI is an absoluteURI, the host is part of the Request-
URI. Any Host header field value in the request MUST be ignored. URI. Any Host header field value in the request MUST be ignored.
2. If the Request-URI is not an absoluteURI, and the request includes
2. If the Request-URI is not an absoluteURI, and the request includes
a Host header field, the host is determined by the Host header a Host header field, the host is determined by the Host header
field value. field value.
3. If the host as determined by rule 1 or 2 is not a valid host on the 3. If the host as determined by rule 1 or 2 is not a valid host on the
server, the response MUST be a 400 (Bad Request) error message. server, the response MUST be a 400 (Bad Request) error message.
Recipients of an HTTP/1.0 request that lacks a Host header field MAY Recipients of an HTTP/1.0 request that lacks a Host header field MAY
attempt to use heuristics (e.g., examination of the URI path for attempt to use heuristics (e.g., examination of the URI path for
something unique to a particular host) in order to determine what exact something unique to a particular host) in order to determine what exact
resource is being requested. resource is being requested.
5.3 Request Header Fields 5.3 Request Header Fields
The request-header fields allow the client to pass additional The request-header fields allow the client to pass additional
skipping to change at page 36, line 34 skipping to change at page 37, line 39
to understand and satisfy the request. These codes are fully defined in to understand and satisfy the request. These codes are fully defined in
section 10. The Reason-Phrase is intended to give a short textual section 10. The Reason-Phrase is intended to give a short textual
description of the Status-Code. The Status-Code is intended for use by description of the Status-Code. The Status-Code is intended for use by
automata and the Reason-Phrase is intended for the human user. The automata and the Reason-Phrase is intended for the human user. The
client is not required to examine or display the Reason-Phrase. client is not required to examine or display the Reason-Phrase.
The first digit of the Status-Code defines the class of response. The The first digit of the Status-Code defines the class of response. The
last two digits do not have any categorization role. There are 5 values last two digits do not have any categorization role. There are 5 values
for the first digit: for the first digit:
. 1xx: Informational - Request received, continuing process o 1xx: Informational - Request received, continuing process
. 2xx: Success - The action was successfully received, understood, o 2xx: Success - The action was successfully received, understood,
and accepted and accepted
. 3xx: Redirection - Further action must be taken in order to o 3xx: Redirection - Further action must be taken in order to
complete the request complete the request
. 4xx: Client Error - The request contains bad syntax or cannot be o 4xx: Client Error - The request contains bad syntax or cannot be
fulfilled fulfilled
. 5xx: Server Error - The server failed to fulfill an apparently o 5xx: Server Error - The server failed to fulfill an apparently
valid request valid request
The individual values of the numeric status codes defined for HTTP/1.1, The individual values of the numeric status codes defined for HTTP/1.1,
and an example set of corresponding Reason-Phrase's, are presented and an example set of corresponding Reason-Phrase's, are presented
below. The reason phrases listed here are only recommended -- they may below. The reason phrases listed here are only recommended -- they may
be replaced by local equivalents without affecting the protocol. be replaced by local equivalents without affecting the protocol.
Status-Code = "100" ; Continue Status-Code = "100" ; Continue
| "101" ; Switching Protocols | "101" ; Switching Protocols
| "200" ; OK | "200" ; OK
| "201" ; Created | "201" ; Created
skipping to change at page 40, line 23 skipping to change at page 41, line 31
8 Connections 8 Connections
8.1 Persistent Connections 8.1 Persistent Connections
8.1.1 Purpose 8.1.1 Purpose
Prior to persistent connections, a separate TCP connection was Prior to persistent connections, a separate TCP connection was
established to fetch each URL, increasing the load on HTTP servers and established to fetch each URL, increasing the load on HTTP servers and
causing congestion on the Internet. The use of inline images and other causing congestion on the Internet. The use of inline images and other
associated data often requires a client to make multiple requests of the associated data often requires a client to make multiple requests of the
same server in a short amount of time. An excellent analysis of these same server in a short amount of time. Analyses of these performance
performance problems is available [30]; analysis and results from a problems are available [30]; analysis and results from a prototype
prototype implementation are in [26]. implementation are in [26].
Persistent HTTP connections have a number of advantages: Persistent HTTP connections have a number of advantages:
. By opening and closing fewer TCP connections, CPU time is saved, o By opening and closing fewer TCP connections, CPU time is saved,
and memory used for TCP protocol control blocks is also saved. and memory used for TCP protocol control blocks is also saved.
. HTTP requests and responses can be pipelined on a connection. o HTTP requests and responses can be pipelined on a connection.
Pipelining allows a client to make multiple requests without Pipelining allows a client to make multiple requests without
waiting for each response, allowing a single TCP connection to be waiting for each response, allowing a single TCP connection to be
used much more efficiently, with much lower elapsed time. used much more efficiently, with much lower elapsed time.
. Network congestion is reduced by reducing the number of packets o Network congestion is reduced by reducing the number of packets
caused by TCP opens, and by allowing TCP sufficient time to caused by TCP opens, and by allowing TCP sufficient time to
determine the congestion state of the network. determine the congestion state of the network.
. HTTP can evolve more gracefully; since errors can be reported o HTTP can evolve more gracefully; since errors can be reported
without the penalty of closing the TCP connection. Clients using without the penalty of closing the TCP connection. Clients using
future versions of HTTP might optimistically try a new feature, but future versions of HTTP might optimistically try a new feature, but
if communicating with an older server, retry with old semantics if communicating with an older server, retry with old semantics
after an error is reported. after an error is reported.
HTTP implementations SHOULD implement persistent connections. HTTP implementations SHOULD implement persistent connections.
8.1.2 Overall Operation 8.1.2 Overall Operation
A significant difference between HTTP/1.1 and earlier versions of HTTP A significant difference between HTTP/1.1 and earlier versions of HTTP
is that persistent connections are the default behavior of any HTTP is that persistent connections are the default behavior of any HTTP
connection. That is, unless otherwise indicated, the client may assume connection. That is, unless otherwise indicated, the client may assume
that the server will maintain a persistent connection. that the server will maintain a persistent connection.
Persistent connections provide a mechanism by which a client and a Persistent connections provide a mechanism by which a client and a
skipping to change at page 42, line 46 skipping to change at page 44, line 4
connection. From the server's point of view, the connection is being connection. From the server's point of view, the connection is being
closed while it was idle, but from the client's point of view, a request closed while it was idle, but from the client's point of view, a request
is in progress. is in progress.
This means that clients, servers, and proxies MUST be able to recover This means that clients, servers, and proxies MUST be able to recover
from asynchronous close events. Client software SHOULD reopen the from asynchronous close events. Client software SHOULD reopen the
transport connection and retransmit the aborted request without user transport connection and retransmit the aborted request without user
interaction so long as the request method is idempotent (see section interaction so long as the request method is idempotent (see section
9.1.2); other methods MUST NOT be automatically retried, although user 9.1.2); other methods MUST NOT be automatically retried, although user
agents MAY offer a human operator the choice of retrying the request. agents MAY offer a human operator the choice of retrying the request.
However, this automatic retry SHOULD NOT be repeated if the second However, this automatic retry SHOULD NOT be repeated if the second
request fails. request fails.
Servers SHOULD always respond to at least one request per connection, if Servers SHOULD always respond to at least one request per connection, if
at all possible. Servers SHOULD NOT close a connection in the middle of at all possible. Servers SHOULD NOT close a connection in the middle of
transmitting a response, unless a network or client failure is transmitting a response, unless a network or client failure is
suspected. suspected.
Clients that use persistent connections SHOULD limit the number of Clients that use persistent connections SHOULD limit the number of
simultaneous connections that they maintain to a given server. A single- simultaneous connections that they maintain to a given server. A single-
user client SHOULD maintain AT MOST 2 connections with any server or user client SHOULD maintain AT MOST 2 connections with any server or
proxy. A proxy SHOULD use up to 2*N connections to another server or proxy. A proxy SHOULD use up to 2*N connections to another server or
proxy, where N is the number of simultaneously active users. These proxy, where N is the number of simultaneously active users. These
guidelines are intended to improve HTTP response times and avoid guidelines are intended to improve HTTP response times and avoid
congestion of the Internet or other networks. congestion of the Internet or other networks.
8.2 Message Transmission Requirements 8.2 Message Transmission Requirements
General requirements: General requirements:
. HTTP/1.1 servers SHOULD maintain persistent connections and use o HTTP/1.1 servers SHOULD maintain persistent connections and use
TCP's flow control mechanisms to resolve temporary overloads, TCP's flow control mechanisms to resolve temporary overloads,
rather than terminating connections with the expectation that rather than terminating connections with the expectation that
clients will retry. The latter technique can exacerbate network clients will retry. The latter technique can exacerbate network
congestion. congestion.
. An HTTP/1.1 (or later) client sending a message-body SHOULD monitor
o An HTTP/1.1 (or later) client sending a message-body SHOULD monitor
the network connection for an error status while it is transmitting the network connection for an error status while it is transmitting
the request. If the client sees an error status, it SHOULD the request. If the client sees an error status, it SHOULD
immediately cease transmitting the body. If the body is being sent immediately cease transmitting the body. If the body is being sent
using a "chunked" encoding (section 3.6), a zero length chunk and using a "chunked" encoding (section 3.6), a zero length chunk and
empty footer MAY be used to prematurely mark the end of the empty footer MAY be used to prematurely mark the end of the
message. If the body was preceded by a Content-Length header, the message. If the body was preceded by a Content-Length header, the
client MUST close the connection. client MUST close the connection.
. An HTTP/1.1 (or later) client MUST be prepared to accept a 100
o An HTTP/1.1 (or later) client MUST be prepared to accept a 100
(Continue) status followed by a regular response. (Continue) status followed by a regular response.
. An HTTP/1.1 (or later) server that receives a request from a
o An HTTP/1.1 (or later) server that receives a request from a
HTTP/1.0 (or earlier) client MUST NOT transmit the 100 (continue) HTTP/1.0 (or earlier) client MUST NOT transmit the 100 (continue)
response; it SHOULD either wait for the request to be completed response; it SHOULD either wait for the request to be completed
normally (thus avoiding an interrupted request) or close the normally (thus avoiding an interrupted request) or close the
connection prematurely. connection prematurely.
Upon receiving a method subject to these requirements from an HTTP/1.1 Upon receiving a method subject to these requirements from an HTTP/1.1
(or later) client, an HTTP/1.1 (or later) server MUST either respond (or later) client, an HTTP/1.1 (or later) server MUST either respond
with 100 (Continue) status and continue to read from the input stream, with 100 (Continue) status and continue to read from the input stream,
or respond with an error status. If it responds with an error status, it or respond with an error status. If it responds with an error status, it
MAY close the transport (TCP) connection or it MAY continue to read and MAY close the transport (TCP) connection or it MAY continue to read and
discard the rest of the request. It MUST NOT perform the requested discard the rest of the request. It MUST NOT perform the requested
method if it returns an error status. method if it returns an error status.
Clients SHOULD remember the version number of at least the most recently Clients SHOULD remember the version number of at least the most recently
used server; if an HTTP/1.1 client has seen an HTTP/1.1 or later used server; if an HTTP/1.1 client has seen an HTTP/1.1 or later
response from the server, and it sees the connection close before response from the server, and it sees the connection close before
receiving any status from the server, the client SHOULD retry the receiving any status from the server, the client SHOULD retry the
request without user interaction so long as the request method is request without user interaction so long as the request method is
idempotent (see section 9.1.2); other methods MUST NOT be automatically idempotent (see section 9.1.2); other methods MUST NOT be automatically
retried, although user agents MAY offer a human operator the choice of retried, although user agents MAY offer a human operator the choice of
retrying the request.. If the client does retry the request, the client retrying the request.. If the client does retry the request, the client
. MUST first send the request header fields, and then o MUST first send the request header fields, and then
. MUST wait for the server to respond with either a 100 (Continue)
o MUST wait for the server to respond with either a 100 (Continue)
response, in which case the client should continue, or with an response, in which case the client should continue, or with an
error status. error status.
If an HTTP/1.1 client has not seen an HTTP/1.1 or later response from If an HTTP/1.1 client has not seen an HTTP/1.1 or later response from
the server, it should assume that the server implements HTTP/1.0 or the server, it should assume that the server implements HTTP/1.0 or
older and will not use the 100 (Continue) response. If in this case the older and will not use the 100 (Continue) response. If in this case the
client sees the connection close before receiving any status from the client sees the connection close before receiving any status from the
server, the client SHOULD retry the request. If the client does retry server, the client SHOULD retry the request. If the client does retry
the request, it should use the following "binary exponential backoff" the request, it should use the following "binary exponential backoff"
algorithm to be assured of obtaining a reliable response: algorithm to be assured of obtaining a reliable response:
1. Initiate a new connection to the server 1. Initiate a new connection to the server
2. Transmit the request-headers
3. Initialize a variable R to the estimated round-trip time to the 2. Transmit the request-headers
3. Initialize a variable R to the estimated round-trip time to the
server (e.g., based on the time it took to establish the server (e.g., based on the time it took to establish the
connection), or to a constant value of 5 seconds if the round-trip connection), or to a constant value of 5 seconds if the round-trip
time is not available. time is not available.
4. Compute T = R * (2**N), where N is the number of previous retries
4. Compute T = R * (2**N), where N is the number of previous retries
of this request. of this request.
5. Wait either for an error response from the server, or for T seconds
5. Wait either for an error response from the server, or for T seconds
(whichever comes first) (whichever comes first)
6. If no error response is received, after T seconds transmit the body
6. If no error response is received, after T seconds transmit the body
of the request. of the request.
7. If client sees that the connection is closed prematurely, repeat
7. If client sees that the connection is closed prematurely, repeat
from step 1 until the request is accepted, an error response is from step 1 until the request is accepted, an error response is
received, or the user becomes impatient and terminates the retry received, or the user becomes impatient and terminates the retry
process. process.
No matter what the server version, if an error status is received, the No matter what the server version, if an error status is received, the
client client
o MUST NOT continue and
. MUST NOT continue and o MUST close the connection if it has not completed sending the
. MUST close the connection if it has not completed sending the
message. message.
An HTTP/1.1 (or later) client that sees the connection close after An HTTP/1.1 (or later) client that sees the connection close after
receiving a 100 (Continue) but before receiving any other status SHOULD receiving a 100 (Continue) but before receiving any other status SHOULD
retry the request, and need not wait for 100 (Continue) response (but retry the request, and need not wait for 100 (Continue) response (but
MAY do so if this simplifies the implementation). MAY do so if this simplifies the implementation).
9 Method Definitions 9 Method Definitions
The set of common methods for HTTP/1.1 is defined below. Although this The set of common methods for HTTP/1.1 is defined below. Although this
set can be expanded, additional methods cannot be assumed to share the set can be expanded, additional methods cannot be assumed to share the
same semantics for separately extended clients and servers. same semantics for separately extended clients and servers.
skipping to change at page 47, line 21 skipping to change at page 48, line 40
by a change in Content-Length, Content-MD5, ETag or Last-Modified), then by a change in Content-Length, Content-MD5, ETag or Last-Modified), then
the cache MUST treat the cache entry as stale. the cache MUST treat the cache entry as stale.
9.5 POST 9.5 POST
The POST method is used to request that the destination server accept The POST method is used to request that the destination server accept
the entity enclosed in the request as a new subordinate of the resource the entity enclosed in the request as a new subordinate of the resource
identified by the Request-URI in the Request-Line. POST is designed to identified by the Request-URI in the Request-Line. POST is designed to
allow a uniform method to cover the following functions: allow a uniform method to cover the following functions:
. Annotation of existing resources; o Annotation of existing resources;
. Posting a message to a bulletin board, newsgroup, mailing list, or o Posting a message to a bulletin board, newsgroup, mailing list, or
similar group of articles; similar group of articles;
. Providing a block of data, such as the result of submitting a form, o Providing a block of data, such as the result of submitting a form,
to a data-handling process; to a data-handling process;
. Extending a database through an append operation. o Extending a database through an append operation.
The actual function performed by the POST method is determined by the The actual function performed by the POST method is determined by the
server and is usually dependent on the Request-URI. The posted entity is server and is usually dependent on the Request-URI. The posted entity is
subordinate to that URI in the same way that a file is subordinate to a subordinate to that URI in the same way that a file is subordinate to a
directory containing it, a news article is subordinate to a newsgroup to directory containing it, a news article is subordinate to a newsgroup to
which it is posted, or a record is subordinate to a database. which it is posted, or a record is subordinate to a database.
The action performed by the POST method might not result in a resource The action performed by the POST method might not result in a resource
that can be identified by a URI. In this case, either 200 (OK) or 204 that can be identified by a URI. In this case, either 200 (OK) or 204
(No Content) is the appropriate response status, depending on whether or (No Content) is the appropriate response status, depending on whether or
not the response includes an entity that describes the result. not the response includes an entity that describes the result.
skipping to change at page 54, line 40 skipping to change at page 56, line 14
10.3.5 304 Not Modified 10.3.5 304 Not Modified
If the client has performed a conditional GET request and access is If the client has performed a conditional GET request and access is
allowed, but the document has not been modified, the server SHOULD allowed, but the document has not been modified, the server SHOULD
respond with this status code. The response MUST NOT contain a message- respond with this status code. The response MUST NOT contain a message-
body. body.
The response MUST include the following header fields: The response MUST include the following header fields:
. Date o Date
. ETag and/or Content-Location, if the header would have been sent in
o ETag and/or Content-Location, if the header would have been sent in
a 200 response to the same request a 200 response to the same request
. Expires, Cache-Control, and/or Vary, if the field-value might
o Expires, Cache-Control, and/or Vary, if the field-value might
differ from that sent in any previous response for the same variant differ from that sent in any previous response for the same variant
If the conditional GET used a strong cache validator (see section If the conditional GET used a strong cache validator (see section
13.3.3), the response SHOULD NOT include other entity-headers. Otherwise 13.3.3), the response SHOULD NOT include other entity-headers. Otherwise
(i.e., the conditional GET used a weak validator), the response MUST NOT (i.e., the conditional GET used a weak validator), the response MUST NOT
include other entity-headers; this prevents inconsistencies between include other entity-headers; this prevents inconsistencies between
cached entity-bodies and updated headers. cached entity-bodies and updated headers.
If a 304 response indicates an entity not currently cached, then the If a 304 response indicates an entity not currently cached, then the
cache MUST disregard the response and repeat the request without the cache MUST disregard the response and repeat the request without the
conditional. conditional.
skipping to change at page 62, line 28 skipping to change at page 64, line 4
WWW-Authenticate: Basic realm="WallyWorld" WWW-Authenticate: Basic realm="WallyWorld"
where "WallyWorld" is the string assigned by the server to identify the where "WallyWorld" is the string assigned by the server to identify the
protection space of the Request-URI. protection space of the Request-URI.
To receive authorization, the client sends the userid and password, To receive authorization, the client sends the userid and password,
separated by a single colon (":") character, within a base64 encoded separated by a single colon (":") character, within a base64 encoded
string in the credentials. string in the credentials.
basic-credentials = "Basic" SP basic-cookie basic-credentials = "Basic" SP basic-cookie
basic-cookie = <base64 [7] encoding of user-pass, basic-cookie = <base64 [7] encoding of user-pass,
except not limited to 76 char/line> except not limited to 76 char/line>
user-pass = userid ":" password user-pass = userid ":" password
userid = *<TEXT excluding ":"> userid = *<TEXT excluding ":">
password = *TEXT password = *TEXT
Userids might be case sensitive. Userids might be case sensitive.
If the user agent wishes to send the userid "Aladdin" and password "open If the user agent wishes to send the userid "Aladdin" and password "open
sesame", it would use the following header field: sesame", it would use the following header field:
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
See section 15 for security considerations associated with Basic See section 15 for security considerations associated with Basic
authentication. authentication.
11.2 Digest Authentication Scheme 11.2 Digest Authentication Scheme
Note for the RFC editor: This section is reserved for including the Note for the RFC editor: This section is reserved for including the
Digest Authentication specification, or if the RFC editor chooses to Digest Authentication specification, or if the RFC editor chooses to
issue a single RFC rather than two RFC's, this section should be issue a single RFC rather than two RFC's, this section should be
deleted. deleted.
12 Content Negotiation 12 Content Negotiation
skipping to change at page 64, line 5 skipping to change at page 65, line 30
describe to the user agent, or when the server desires to send its "best describe to the user agent, or when the server desires to send its "best
guess" to the client along with the first response (hoping to avoid the guess" to the client along with the first response (hoping to avoid the
round-trip delay of a subsequent request if the "best guess" is good round-trip delay of a subsequent request if the "best guess" is good
enough for the user). In order to improve the server's guess, the user enough for the user). In order to improve the server's guess, the user
agent MAY include request header fields (Accept, Accept-Language, agent MAY include request header fields (Accept, Accept-Language,
Accept-Encoding, etc.) which describe its preferences for such a Accept-Encoding, etc.) which describe its preferences for such a
response. response.
Server-driven negotiation has disadvantages: Server-driven negotiation has disadvantages:
1. It is impossible for the server to accurately determine what might be 1. It is impossible for the server to accurately determine what might be
"best" for any given user, since that would require complete "best" for any given user, since that would require complete
knowledge of both the capabilities of the user agent and the intended knowledge of both the capabilities of the user agent and the intended
use for the response (e.g., does the user want to view it on screen use for the response (e.g., does the user want to view it on screen
or print it on paper?). or print it on paper?).
2. Having the user agent describe its capabilities in every request can 2. Having the user agent describe its capabilities in every request can
be both very inefficient (given that only a small percentage of be both very inefficient (given that only a small percentage of
responses have multiple representations) and a potential violation of responses have multiple representations) and a potential violation of
the user's privacy. the user's privacy.
3. It complicates the implementation of an origin server and the 3. It complicates the implementation of an origin server and the
algorithms for generating responses to a request. algorithms for generating responses to a request.
4. It may limit a public cache's ability to use the same response for 4. It may limit a public cache's ability to use the same response for
multiple user's requests. multiple user's requests.
HTTP/1.1 includes the following request-header fields for enabling HTTP/1.1 includes the following request-header fields for enabling
server-driven negotiation through description of user agent capabilities server-driven negotiation through description of user agent capabilities
and user preferences: Accept (section 14.1), Accept-Charset (section and user preferences: Accept (section 14.1), Accept-Charset (section
14.2), Accept-Encoding (section 14.3), Accept-Language (section 14.4), 14.2), Accept-Encoding (section 14.3), Accept-Language (section 14.4),
and User-Agent (section 14.42). However, an origin server is not limited and User-Agent (section 14.42). However, an origin server is not limited
to these dimensions and MAY vary the response based on any aspect of the to these dimensions and MAY vary the response based on any aspect of the
request, including information outside the request-header fields or request, including information outside the request-header fields or
within extension header fields not defined by this specification. within extension header fields not defined by this specification.
skipping to change at page 64, line 48 skipping to change at page 66, line 24
included in a response and obey the requirements described in section included in a response and obey the requirements described in section
13.6 that describes the interactions between caching and content 13.6 that describes the interactions between caching and content
negotiation. negotiation.
12.2 Agent-driven Negotiation 12.2 Agent-driven Negotiation
With agent-driven negotiation, selection of the best representation for With agent-driven negotiation, selection of the best representation for
a response is performed by the user agent after receiving an initial a response is performed by the user agent after receiving an initial
response from the origin server. Selection is based on a list of the response from the origin server. Selection is based on a list of the
available representations of the response included within the header available representations of the response included within the header
fields (this specification reserves the keyword Alternates, as described fields (this specification reserves the field-name Alternates, as
in appendix 19.6.2.1) or entity-body of the initial response, with each described in appendix 19.6.2.1) or entity-body of the initial response,
representation identified by its own URI. Selection from among the with each representation identified by its own URI. Selection from among
representations may be performed automatically (if the user agent is the representations may be performed automatically (if the user agent is
capable of doing so) or manually by the user selecting from a generated capable of doing so) or manually by the user selecting from a generated
(possibly hypertext) menu. (possibly hypertext) menu.
Agent-driven negotiation is advantageous when the response would vary Agent-driven negotiation is advantageous when the response would vary
over commonly-used dimensions (such as type, language, or encoding), over commonly-used dimensions (such as type, language, or encoding),
when the origin server is unable to determine a user agent's when the origin server is unable to determine a user agent's
capabilities from examining the request, and generally when public capabilities from examining the request, and generally when public
caches are used to distribute server load and reduce network usage. caches are used to distribute server load and reduce network usage.
Agent-driven negotiation suffers from the disadvantage of needing a Agent-driven negotiation suffers from the disadvantage of needing a
skipping to change at page 66, line 25 skipping to change at page 67, line 52
Requirements for performance, availability, and disconnected operation Requirements for performance, availability, and disconnected operation
require us to be able to relax the goal of semantic transparency. The require us to be able to relax the goal of semantic transparency. The
HTTP/1.1 protocol allows origin servers, caches, and clients to HTTP/1.1 protocol allows origin servers, caches, and clients to
explicitly reduce transparency when necessary. However, because non- explicitly reduce transparency when necessary. However, because non-
transparent operation may confuse non-expert users, and may be transparent operation may confuse non-expert users, and may be
incompatible with certain server applications (such as those for incompatible with certain server applications (such as those for
ordering merchandise), the protocol requires that transparency be ordering merchandise), the protocol requires that transparency be
relaxed relaxed
. only by an explicit protocol-level request when relaxed by client o only by an explicit protocol-level request when relaxed by client
or origin server or origin server
. only with an explicit warning to the end user when relaxed by cache o only with an explicit warning to the end user when relaxed by cache
or client or client
Therefore, the HTTP/1.1 protocol provides these important elements: Therefore, the HTTP/1.1 protocol provides these important elements:
1. Protocol features that provide full semantic transparency when this 1. Protocol features that provide full semantic transparency when this
is required by all parties. is required by all parties.
2. Protocol features that allow an origin server or user agent to 2. Protocol features that allow an origin server or user agent to
explicitly request and control non-transparent operation. explicitly request and control non-transparent operation.
3. Protocol features that allow a cache to attach warnings to 3. Protocol features that allow a cache to attach warnings to
responses that do not preserve the requested approximation of responses that do not preserve the requested approximation of
semantic transparency. semantic transparency.
A basic principle is that it must be possible for the clients to detect A basic principle is that it must be possible for the clients to detect
any potential relaxation of semantic transparency. any potential relaxation of semantic transparency.
Note: The server, cache, or client implementer may be faced with Note: The server, cache, or client implementer may be faced with
design decisions not explicitly discussed in this specification. If design decisions not explicitly discussed in this specification. If
a decision may affect semantic transparency, the implementer ought a decision may affect semantic transparency, the implementer ought
to err on the side of maintaining transparency unless a careful and to err on the side of maintaining transparency unless a careful and
complete analysis shows significant benefits in breaking complete analysis shows significant benefits in breaking
transparency. transparency.
skipping to change at page 67, line 8 skipping to change at page 68, line 38
13.1.1 Cache Correctness 13.1.1 Cache Correctness
A correct cache MUST respond to a request with the most up-to-date A correct cache MUST respond to a request with the most up-to-date
response held by the cache that is appropriate to the request (see response held by the cache that is appropriate to the request (see
sections 13.2.5, 13.2.6, and 13.12) which meets one of the following sections 13.2.5, 13.2.6, and 13.12) which meets one of the following
conditions: conditions:
1. It has been checked for equivalence with what the origin server 1. It has been checked for equivalence with what the origin server
would have returned by revalidating the response with the origin would have returned by revalidating the response with the origin
server (section 13.3); server (section 13.3);
2. It is "fresh enough" (see section 13.2). In the default case, this 2. It is "fresh enough" (see section 13.2). In the default case, this
means it meets the least restrictive freshness requirement of the means it meets the least restrictive freshness requirement of the
client, server, and cache (see section 14.9); if the origin server client, server, and cache (see section 14.9); if the origin server
so specifies, it is the freshness requirement of the origin server so specifies, it is the freshness requirement of the origin server
alone. alone.
3. It includes a warning if the freshness demand of the client or the
3. It includes a warning if the freshness demand of the client or the
origin server is violated (see section 13.1.5 and 14.45). origin server is violated (see section 13.1.5 and 14.45).
4. It is an appropriate 304 (Not Modified), 305 (Proxy Redirect), or
4. It is an appropriate 304 (Not Modified), 305 (Proxy Redirect), or
error (4xx or 5xx) response message. error (4xx or 5xx) response message.
and it is the most up-to-date response appropriate to the request the
cache has (see section 13.2.5, 13.2.6, and 13.12).
If the cache can not communicate with the origin server, then a correct If the cache can not communicate with the origin server, then a correct
cache SHOULD respond as above if the response can be correctly served cache SHOULD respond as above if the response can be correctly served
from the cache; if not it MUST return an error or warning indicating from the cache; if not it MUST return an error or warning indicating
that there was a communication failure. that there was a communication failure.
If a cache receives a response (either an entire response, or a 304 (Not If a cache receives a response (either an entire response, or a 304 (Not
Modified) response) that it would normally forward to the requesting Modified) response) that it would normally forward to the requesting
client, and the received response is no longer fresh, the cache SHOULD client, and the received response is no longer fresh, the cache SHOULD
forward it to the requesting client without adding a new Warning (but forward it to the requesting client without adding a new Warning (but
without removing any existing Warning headers). A cache SHOULD NOT without removing any existing Warning headers). A cache SHOULD NOT
attempt to revalidate a response simply because that response became attempt to revalidate a response simply because that response became
stale in transit; this might lead to an infinite loop. An user agent stale in transit; this might lead to an infinite loop. An user agent
that receives a stale response without a Warning MAY display a warning that receives a stale response without a Warning MAY display a warning
indication to the user. indication to the user.
13.1.2 Warnings 13.1.2 Warnings
Whenever a cache returns a response that is neither first-hand nor Whenever a cache returns a response that is neither first-hand nor
"fresh enough" (in the sense of condition 2 in section 13.1.1), it must "fresh enough" (in the sense of condition 2 in section 13.1.1), it must
attach a warning to that effect, using a Warning response-header. This attach a warning to that effect, using a Warning response-header. This
warning allows clients to take appropriate action. warning allows clients to take appropriate action.
Warnings may be used for other purposes, both cache-related and Warnings may be used for other purposes, both cache-related and
otherwise. The use of a warning, rather than an error status code, otherwise. The use of a warning, rather than an error status code,
distinguish these responses from true failures. distinguish these responses from true failures.
Warnings are always cachable, because they never weaken the transparency Warnings are always cachable, because they never weaken the transparency
of a response. This means that warnings can be passed to HTTP/1.0 caches of a response. This means that warnings can be passed to HTTP/1.0 caches
skipping to change at page 71, line 19 skipping to change at page 72, line 50
origin servers to provide explicit expiration times as much as possible. origin servers to provide explicit expiration times as much as possible.
13.2.3 Age Calculations 13.2.3 Age Calculations
In order to know if a cached entry is fresh, a cache needs to know if In order to know if a cached entry is fresh, a cache needs to know if
its age exceeds its freshness lifetime. We discuss how to calculate the its age exceeds its freshness lifetime. We discuss how to calculate the
latter in section 13.2.4; this section describes how to calculate the latter in section 13.2.4; this section describes how to calculate the
age of a response or cache entry. age of a response or cache entry.
In this discussion, we use the term "now" to mean "the current value of In this discussion, we use the term "now" to mean "the current value of
the clock at the host performing the calculation." All HTTP the clock at the host performing the calculation." Hosts that use HTTP,
implementations, but especially origin servers and caches, should use but especially hosts running origin servers and caches, should use NTP
NTP [28] or some similar protocol to synchronize their clocks to a [28] or some similar protocol to synchronize their clocks to a globally
globally accurate time standard. accurate time standard.
Also note that HTTP/1.1 requires origin servers to send a Date header Also note that HTTP/1.1 requires origin servers to send a Date header
with every response, giving the time at which the response was with every response, giving the time at which the response was
generated. We use the term "date_value" to denote the value of the Date generated. We use the term "date_value" to denote the value of the Date
header, in a form appropriate for arithmetic operations. header, in a form appropriate for arithmetic operations.
HTTP/1.1 uses the Age response-header to help convey age information HTTP/1.1 uses the Age response-header to help convey age information
between caches. The Age header value is the sender's estimate of the between caches. The Age header value is the sender's estimate of the
amount of time since the response was generated at the origin server. In amount of time since the response was generated at the origin server. In
the case of a cached response that has been revalidated with the origin the case of a cached response that has been revalidated with the origin
skipping to change at page 77, line 33 skipping to change at page 79, line 16
usable in contexts that do not depend on exact equality of an entity. usable in contexts that do not depend on exact equality of an entity.
For example, either kind is usable for a conditional GET of a full For example, either kind is usable for a conditional GET of a full
entity. However, only a strong validator is usable for a sub-range entity. However, only a strong validator is usable for a sub-range
retrieval, since otherwise the client may end up with an internally retrieval, since otherwise the client may end up with an internally
inconsistent entity. inconsistent entity.
The only function that the HTTP/1.1 protocol defines on validators is The only function that the HTTP/1.1 protocol defines on validators is
comparison. There are two validator comparison functions, depending on comparison. There are two validator comparison functions, depending on
whether the comparison context allows the use of weak validators or not: whether the comparison context allows the use of weak validators or not:
. The strong comparison function: in order to be considered equal, o The strong comparison function: in order to be considered equal,
both validators must be identical in every way, and neither may be both validators must be identical in every way, and neither may be
weak. weak.
. The weak comparison function: in order to be considered equal, both o The weak comparison function: in order to be considered equal, both
validators must be identical in every way, but either or both of validators must be identical in every way, but either or both of
them may be tagged as "weak" without affecting the result. them may be tagged as "weak" without affecting the result.
The weak comparison function MAY be used for simple (non-subrange) GET The weak comparison function MAY be used for simple (non-subrange) GET
requests. The strong comparison function MUST be used in all other requests. The strong comparison function MUST be used in all other
cases. cases.
An entity tag is strong unless it is explicitly tagged as weak. Section An entity tag is strong unless it is explicitly tagged as weak. Section
3.11 gives the syntax for entity tags. 3.11 gives the syntax for entity tags.
A Last-Modified time, when used as a validator in a request, is A Last-Modified time, when used as a validator in a request, is
implicitly weak unless it is possible to deduce that it is strong, using implicitly weak unless it is possible to deduce that it is strong, using
the following rules: the following rules:
. The validator is being compared by an origin server to the actual o The validator is being compared by an origin server to the actual
current validator for the entity and, current validator for the entity and,
. That origin server reliably knows that the associated entity did o That origin server reliably knows that the associated entity did
not change twice during the second covered by the presented not change twice during the second covered by the presented
validator. validator.
or or
. The validator is about to be used by a client in an If-Modified-
o The validator is about to be used by a client in an If-Modified-
Since or If-Unmodified-Since header, because the client has a cache Since or If-Unmodified-Since header, because the client has a cache
entry for the associated entity, and entry for the associated entity, and
. That cache entry includes a Date value, which gives the time when o That cache entry includes a Date value, which gives the time when
the origin server sent the original response, and the origin server sent the original response, and
. The presented Last-Modified time is at least 60 seconds before the o The presented Last-Modified time is at least 60 seconds before the
Date value. Date value.
or or
. The validator is being compared by an intermediate cache to the o The validator is being compared by an intermediate cache to the
validator stored in its cache entry for the entity, and validator stored in its cache entry for the entity, and
. That cache entry includes a Date value, which gives the time when o That cache entry includes a Date value, which gives the time when
the origin server sent the original response, and the origin server sent the original response, and
. The presented Last-Modified time is at least 60 seconds before the o The presented Last-Modified time is at least 60 seconds before the
Date value. Date value.
This method relies on the fact that if two different responses were sent This method relies on the fact that if two different responses were sent
by the origin server during the same second, but both had the same Last- by the origin server during the same second, but both had the same Last-
Modified time, then at least one of those responses would have a Date Modified time, then at least one of those responses would have a Date
value equal to its Last-Modified time. The arbitrary 60-second limit value equal to its Last-Modified time. The arbitrary 60-second limit
guards against the possibility that the Date and Last-Modified values guards against the possibility that the Date and Last-Modified values
are generated from different clocks, or at somewhat different times are generated from different clocks, or at somewhat different times
during the preparation of the response. An implementation may use a during the preparation of the response. An implementation may use a
value larger than 60 seconds, if it is believed that 60 seconds is too value larger than 60 seconds, if it is believed that 60 seconds is too
short. short.
skipping to change at page 78, line 49 skipping to change at page 80, line 35
servers. servers.
13.3.4 Rules for When to Use Entity Tags and Last-modified Dates 13.3.4 Rules for When to Use Entity Tags and Last-modified Dates
We adopt a set of rules and recommendations for origin servers, clients, We adopt a set of rules and recommendations for origin servers, clients,
and caches regarding when various validator types should be used, and and caches regarding when various validator types should be used, and
for what purposes. for what purposes.
HTTP/1.1 origin servers: HTTP/1.1 origin servers:
. SHOULD send an entity tag validator unless it is not feasible to o SHOULD send an entity tag validator unless it is not feasible to
generate one. generate one.
. MAY send a weak entity tag instead of a strong entity tag, if o MAY send a weak entity tag instead of a strong entity tag, if
performance considerations support the use of weak entity tags, or performance considerations support the use of weak entity tags, or
if it is unfeasible to send a strong entity tag. if it is unfeasible to send a strong entity tag.
o SHOULD send a Last-Modified value if it is feasible to send one,
. SHOULD send a Last-Modified value if it is feasible to send one,
unless the risk of a breakdown in semantic transparency that could unless the risk of a breakdown in semantic transparency that could
result from using this date in an If-Modified-Since header would result from using this date in an If-Modified-Since header would
lead to serious problems. lead to serious problems.
In other words, the preferred behavior for an HTTP/1.1 origin server is In other words, the preferred behavior for an HTTP/1.1 origin server is
to send both a strong entity tag and a Last-Modified value. to send both a strong entity tag and a Last-Modified value.
In order to be legal, a strong entity tag MUST change whenever the In order to be legal, a strong entity tag MUST change whenever the
associated entity value changes in any way. A weak entity tag SHOULD associated entity value changes in any way. A weak entity tag SHOULD
change whenever the associated entity changes in a semantically change whenever the associated entity changes in a semantically
significant way. significant way.
Note: in order to provide semantically transparent caching, an Note: in order to provide semantically transparent caching, an
origin server must avoid reusing a specific strong entity tag value origin server must avoid reusing a specific strong entity tag value
for two different entities, or reusing a specific weak entity tag for two different entities, or reusing a specific weak entity tag
value for two semantically different entities. Cache entries may value for two semantically different entities. Cache entries may
persist for arbitrarily long periods, regardless of expiration persist for arbitrarily long periods, regardless of expiration
times, so it may be inappropriate to expect that a cache will never times, so it may be inappropriate to expect that a cache will never
again attempt to validate an entry using a validator that it again attempt to validate an entry using a validator that it
obtained at some point in the past. obtained at some point in the past.
HTTP/1.1 clients: HTTP/1.1 clients:
. If an entity tag has been provided by the origin server, MUST use o If an entity tag has been provided by the origin server, MUST use
that entity tag in any cache-conditional request (using If-Match or that entity tag in any cache-conditional request (using If-Match or
If-None-Match). If-None-Match).
. If only a Last-Modified value has been provided by the origin o If only a Last-Modified value has been provided by the origin
server, SHOULD use that value in non-subrange cache-conditional server, SHOULD use that value in non-subrange cache-conditional
requests (using If-Modified-Since). requests (using If-Modified-Since).
. If only a Last-Modified value has been provided by an HTTP/1.0 o If only a Last-Modified value has been provided by an HTTP/1.0
origin server, MAY use that value in subrange cache-conditional origin server, MAY use that value in subrange cache-conditional
requests (using If-Unmodified-Since:). The user agent should requests (using If-Unmodified-Since:). The user agent should
provide a way to disable this, in case of difficulty. provide a way to disable this, in case of difficulty.
. If both an entity tag and a Last-Modified value have been provided o If both an entity tag and a Last-Modified value have been provided
by the origin server, SHOULD use both validators in cache- by the origin server, SHOULD use both validators in cache-
conditional requests. This allows both HTTP/1.0 and HTTP/1.1 caches conditional requests. This allows both HTTP/1.0 and HTTP/1.1 caches
to respond appropriately. to respond appropriately.
An HTTP/1.1 cache, upon receiving a request, MUST use the most An HTTP/1.1 cache, upon receiving a request, MUST use the most
restrictive validator when deciding whether the client's cache entry restrictive validator when deciding whether the client's cache entry
matches the cache's own cache entry. This is only an issue when the matches the cache's own cache entry. This is only an issue when the
request contains both an entity tag and a last-modified-date validator request contains both an entity tag and a last-modified-date validator
(If-Modified-Since or If-Unmodified-Since). (If-Modified-Since or If-Unmodified-Since).
A note on rationale: The general principle behind these rules is A note on rationale: The general principle behind these rules is
that HTTP/1.1 servers and clients should transmit as much non- that HTTP/1.1 servers and clients should transmit as much non-
redundant information as is available in their responses and redundant information as is available in their responses and
requests. HTTP/1.1 systems receiving this information will make the requests. HTTP/1.1 systems receiving this information will make the
skipping to change at page 81, line 26 skipping to change at page 83, line 13
cases, a cache simply returns the appropriate parts of a response to the cases, a cache simply returns the appropriate parts of a response to the
requester. However, if the cache holds a cache entry based on a previous requester. However, if the cache holds a cache entry based on a previous
response, it may have to combine parts of a new response with what is response, it may have to combine parts of a new response with what is
held in the cache entry. held in the cache entry.
13.5.1 End-to-end and Hop-by-hop Headers 13.5.1 End-to-end and Hop-by-hop Headers
For the purpose of defining the behavior of caches and non-caching For the purpose of defining the behavior of caches and non-caching
proxies, we divide HTTP headers into two categories: proxies, we divide HTTP headers into two categories:
. End-to-end headers, which must be transmitted to the ultimate o End-to-end headers, which must be transmitted to the ultimate
recipient of a request or response. End-to-end headers in responses recipient of a request or response. End-to-end headers in responses
must be stored as part of a cache entry and transmitted in any must be stored as part of a cache entry and transmitted in any
response formed from a cache entry. response formed from a cache entry.
. Hop-by-hop headers, which are meaningful only for a single o Hop-by-hop headers, which are meaningful only for a single
transport-level connection, and are not stored by caches or transport-level connection, and are not stored by caches or
forwarded by proxies. forwarded by proxies.
The following HTTP/1.1 headers are hop-by-hop headers: The following HTTP/1.1 headers are hop-by-hop headers:
. Connection o Connection
. Keep-Alive o Keep-Alive
. Public o Public
. Proxy-Authenticate o Proxy-Authenticate
. Transfer-Encoding o Transfer-Encoding
. Upgrade o Upgrade
All other headers defined by HTTP/1.1 are end-to-end headers. All other headers defined by HTTP/1.1 are end-to-end headers.
Hop-by-hop headers introduced in future versions of HTTP MUST be listed Hop-by-hop headers introduced in future versions of HTTP MUST be listed
in a Connection header, as described in section 14.10. in a Connection header, as described in section 14.10.
13.5.2 Non-modifiable Headers 13.5.2 Non-modifiable Headers
Some features of the HTTP/1.1 protocol, such as Digest Authentication, Some features of the HTTP/1.1 protocol, such as Digest Authentication,
depend on the value of certain end-to-end headers. A cache or non- depend on the value of certain end-to-end headers. A cache or non-
caching proxy SHOULD NOT modify an end-to-end header unless the caching proxy SHOULD NOT modify an end-to-end header unless the
definition of that header requires or specifically allows that. definition of that header requires or specifically allows that.
A cache or non-caching proxy MUST NOT modify any of the following fields A cache or non-caching proxy MUST NOT modify any of the following fields
in a request or response, nor may it add any of these fields if not in a request or response, nor may it add any of these fields if not
already present: already present:
. Content-Location o Content-Location
. ETag o ETag
. Expires o Expires
. Last-Modified o Last-Modified
A cache or non-caching proxy MUST NOT modify or add any of the following A cache or non-caching proxy MUST NOT modify or add any of the following
fields in a response that contains the no-transform Cache-Control fields in a response that contains the no-transform Cache-Control
directive, or in any request: directive, or in any request:
. Content-Encoding o Content-Encoding
. Content-Length o Content-Length
. Content-Range o Content-Range
. Content-Type o Content-Type
A cache or non-caching proxy MAY modify or add these fields in a A cache or non-caching proxy MAY modify or add these fields in a
response that does not include no-transform, but if it does so, it MUST response that does not include no-transform, but if it does so, it MUST
add a Warning 14 (Transformation applied) if one does not already appear add a Warning 14 (Transformation applied) if one does not already appear
in the response. in the response.
Warning: unnecessary modification of end-to-end headers may cause Warning: unnecessary modification of end-to-end headers may cause
authentication failures if stronger authentication mechanisms are authentication failures if stronger authentication mechanisms are
introduced in later versions of HTTP. Such authentication introduced in later versions of HTTP. Such authentication
mechanisms may rely on the values of header fields not listed here. mechanisms may rely on the values of header fields not listed here.
skipping to change at page 83, line 21 skipping to change at page 85, line 12
either because the request included one or more Range specifications, or either because the request included one or more Range specifications, or
because a connection was broken prematurely. After several such because a connection was broken prematurely. After several such
transfers, a cache may have received several ranges of the same entity- transfers, a cache may have received several ranges of the same entity-
body. body.
If a cache has a stored non-empty set of subranges for an entity, and an If a cache has a stored non-empty set of subranges for an entity, and an
incoming response transfers another subrange, the cache MAY combine the incoming response transfers another subrange, the cache MAY combine the
new subrange with the existing set if both the following conditions are new subrange with the existing set if both the following conditions are
met: met:
. Both the incoming response and the cache entry must have a cache o Both the incoming response and the cache entry must have a cache
validator. validator.
. The two cache validators must match using the strong comparison o The two cache validators must match using the strong comparison
function (see section 13.3.3). function (see section 13.3.3).
If either requirement is not meant, the cache must use only the most If either requirement is not meant, the cache must use only the most
recent partial response (based on the Date values transmitted with every recent partial response (based on the Date values transmitted with every
response, and using the incoming response if these values are equal or response, and using the incoming response if these values are equal or
missing), and must discard the other partial information. missing), and must discard the other partial information.
13.6 Caching Negotiated Responses 13.6 Caching Negotiated Responses
Use of server-driven content negotiation (section 12), as indicated by Use of server-driven content negotiation (section 12), as indicated by
the presence of a Vary header field in a response, alters the conditions the presence of a Vary header field in a response, alters the conditions
and procedure by which a cache can use the response for subsequent and procedure by which a cache can use the response for subsequent
skipping to change at page 85, line 48 skipping to change at page 87, line 39
In this section, the phrase "invalidate an entity" means that the cache In this section, the phrase "invalidate an entity" means that the cache
should either remove all instances of that entity from its storage, or should either remove all instances of that entity from its storage, or
should mark these as "invalid" and in need of a mandatory revalidation should mark these as "invalid" and in need of a mandatory revalidation
before they can be returned in response to a subsequent request. before they can be returned in response to a subsequent request.
Some HTTP methods may invalidate an entity. This is either the entity Some HTTP methods may invalidate an entity. This is either the entity
referred to by the Request-URI, or by the Location or Content-Location referred to by the Request-URI, or by the Location or Content-Location
response-headers (if present). These methods are: response-headers (if present). These methods are:
. PUT o PUT
. DELETE o DELETE
. POST o POST
In order to prevent denial of service attacks, an invalidation based on In order to prevent denial of service attacks, an invalidation based on
the URI in a Location or Content-Location header MUST only be performed the URI in a Location or Content-Location header MUST only be performed
if the host part is the same as in the Request-URI. if the host part is the same as in the Request-URI.
13.11 Write-Through Mandatory 13.11 Write-Through Mandatory
All methods that may be expected to cause modifications to the origin All methods that may be expected to cause modifications to the origin
server's resources MUST be written through to the origin server. This server's resources MUST be written through to the origin server. This
currently includes all methods except for GET and HEAD. A cache MUST NOT currently includes all methods except for GET and HEAD. A cache MUST NOT
reply to such a request from a client before having transmitted the reply to such a request from a client before having transmitted the
skipping to change at page 87, line 36 skipping to change at page 89, line 26
to either the client or the server, depending on who sends and who to either the client or the server, depending on who sends and who
receives the entity. receives the entity.
14.1 Accept 14.1 Accept
The Accept request-header field can be used to specify certain media The Accept request-header field can be used to specify certain media
types which are acceptable for the response. Accept headers can be used types which are acceptable for the response. Accept headers can be used
to indicate that the request is specifically limited to a small set of to indicate that the request is specifically limited to a small set of
desired types, as in the case of a request for an in-line image. desired types, as in the case of a request for an in-line image.
Accept = "Accept" ":" #( Accept = "Accept" ":"
media-range #( media-range [ accept-params ] )
[ ( ":" | ";" )
range-parameter
*( ";" range-parameter ) ]
| extension-token )
media-range = ( "*/*" media-range = ( "*/*"
| ( type "/" "*" ) | ( type "/" "*" )
| ( type "/" subtype ) | ( type "/" subtype )
) *( ";" parameter ) ) *( ";" parameter )
range-parameter = ( "q" "=" qvalue ) accept-params = ";" "q" "=" qvalue *( accept-extension )
| extension-range-parameter
extension-range-parameter = ( token "=" token ) accept-extension = ";" token [ "=" ( token | quoted-string ) ]
extension-token = token
The asterisk "*" character is used to group media types into ranges, The asterisk "*" character is used to group media types into ranges,
with "*/*" indicating all media types and "type/*" indicating all with "*/*" indicating all media types and "type/*" indicating all
subtypes of that type. The range-parameter q is used to indicate the subtypes of that type. The media-range MAY include media type parameters
media type quality factor for the range, which represents the user's that are applicable to that range.
preference for that range of media types. The default value is q=1. In
Accept headers sent by HTTP/1.1 clients, the character separating media- Each media-range MAY be followed by one or more accept-params, beginning
ranges from range-parameters MUST be a ":". HTTP/1.1 servers SHOULD be with the "q" parameter for indicating a relative quality factor. The
tolerant of use of the ";" separator by HTTP/1.0 clients. first "q" parameter (if any) separates the media-range parameter(s) from
the accept-params. Quality factors allow the user or user agent to
indicate the relative degree of preference for that media-range, using
the qvalue scale from 0 to 1 (section 3.9). The default value is q=1.
Note: Use of the "q" parameter name to separate media type
parameters from Accept extension parameters is due to historical
practice. Although this prevents any media type parameter named
"q" from being used with a media range, such an event is believed
to be unlikely given the lack of any "q" parameters in the IANA
media type registry and the rare usage of any media type parameters
in Accept. Future media types should be discouraged from
registering any parameter named "q".
The example The example
Accept: audio/*: q=0.2, audio/basic Accept: audio/*; q=0.2, audio/basic
SHOULD be interpreted as "I prefer audio/basic, but send me any audio SHOULD be interpreted as "I prefer audio/basic, but send me any audio
type if it is the best available after an 80% mark-down in quality." type if it is the best available after an 80% mark-down in quality."
If no Accept header is present, then it is assumed that the client If no Accept header field is present, then it is assumed that the client
accepts all media types. If Accept headers are present, and if the accepts all media types. If an Accept header field is present, and if
server cannot send a response which is acceptable according to the the server cannot send a response which is acceptable according to the
Accept headers, then the server SHOULD send an error response with the combined Accept field value, then the server SHOULD send a 406 (not
406 (not acceptable) status code, though the sending of an unacceptable acceptable) response.
response is also allowed.
A more elaborate example is A more elaborate example is
Accept: text/plain: q=0.5, text/html, Accept: text/plain; q=0.5, text/html,
text/x-dvi: q=0.8, text/x-c text/x-dvi; q=0.8, text/x-c
Verbally, this would be interpreted as "text/html and text/x-c are the Verbally, this would be interpreted as "text/html and text/x-c are the
preferred media types, but if they do not exist, then send the text/x- preferred media types, but if they do not exist, then send the text/x-
dvi entity, and if that does not exist, send the text/plain entity." dvi entity, and if that does not exist, send the text/plain entity."
Media ranges can be overridden by more specific media ranges or specific Media ranges can be overridden by more specific media ranges or specific
media types. If more than one media range applies to a given type, the media types. If more than one media range applies to a given type, the
most specific reference has precedence. For example, most specific reference has precedence. For example,
Accept: text/*, text/html, text/html;level=1, */* Accept: text/*, text/html, text/html;level=1, */*
skipping to change at page 89, line 4 skipping to change at page 90, line 49
have the following precedence: have the following precedence:
1) text/html;level=1 1) text/html;level=1
2) text/html 2) text/html
3) text/* 3) text/*
4) */* 4) */*
The media type quality factor associated with a given type is determined The media type quality factor associated with a given type is determined
by finding the media range with the highest precedence which matches by finding the media range with the highest precedence which matches
that type. For example, that type. For example,
Accept: text/*:q=0.3, text/html:q=0.7, text/html;level=1,
text/html;level=2:q=0.4, */*:q=0.5 Accept: text/*;q=0.3, text/html;q=0.7, text/html;level=1,
text/html;level=2;q=0.4, */*;q=0.5
would cause the following values to be associated: would cause the following values to be associated:
text/html;level=1 = 1 text/html;level=1 = 1
text/html = 0.7 text/html = 0.7
text/plain = 0.3 text/plain = 0.3
image/jpeg = 0.5 image/jpeg = 0.5
text/html;level=2 = 0.4 text/html;level=2 = 0.4
text/html;level=3 = 0.7 text/html;level=3 = 0.7
skipping to change at page 91, line 23 skipping to change at page 93, line 17
user in every request. For a discussion of this issue, see section 15.7. user in every request. For a discussion of this issue, see section 15.7.
Note: As intelligibility is highly dependent on the individual Note: As intelligibility is highly dependent on the individual
user, it is recommended that client applications make the choice of user, it is recommended that client applications make the choice of
linguistic preference available to the user. If the choice is not linguistic preference available to the user. If the choice is not
made available, then the Accept-Language header field must not be made available, then the Accept-Language header field must not be
given in the request. given in the request.
14.5 Accept-Ranges 14.5 Accept-Ranges
The Accept-Ranges response header allows the server to indicate its The Accept-Ranges response-header field allows the server to indicate
acceptance of range requests for a resource: its acceptance of range requests for a resource:
Accept-Ranges = "Accept-Ranges" ":" acceptable-ranges Accept-Ranges = "Accept-Ranges" ":" acceptable-ranges
acceptable-ranges = 1#range-unit | "none" acceptable-ranges = 1#range-unit | "none"
Origin servers that accept byte-range requests MAY send Origin servers that accept byte-range requests MAY send
Accept-Ranges: bytes Accept-Ranges: bytes
but are not required to do so. Clients MAY generate byte-range requests but are not required to do so. Clients MAY generate byte-range requests
skipping to change at page 94, line 37 skipping to change at page 96, line 28
directive applies to the entire request or response. When such a directive applies to the entire request or response. When such a
directive appears with a 1#field-name parameter, it applies only to the directive appears with a 1#field-name parameter, it applies only to the
named field or fields, and not to the rest of the request or response. named field or fields, and not to the rest of the request or response.
This mechanism supports extensibility; implementations of future This mechanism supports extensibility; implementations of future
versions of the HTTP protocol may apply these directives to header versions of the HTTP protocol may apply these directives to header
fields not defined in HTTP/1.1. fields not defined in HTTP/1.1.
The cache-control directives can be broken down into these general The cache-control directives can be broken down into these general
categories: categories:
. Restrictions on what is cachable; these may only be imposed by the o Restrictions on what is cachable; these may only be imposed by the
origin server. origin server.
. Restrictions on what may be stored by a cache; these may be imposed o Restrictions on what may be stored by a cache; these may be imposed
by either the origin server or the user agent. by either the origin server or the user agent.
. Modifications of the basic expiration mechanism; these may be o Modifications of the basic expiration mechanism; these may be
imposed by either the origin server or the user agent. imposed by either the origin server or the user agent.
. Controls over cache revalidation and reload; these may only be o Controls over cache revalidation and reload; these may only be
imposed by an user agent. imposed by a user agent.
. Control over transformation of entities. o Control over transformation of entities.
. Extensions to the caching system. o Extensions to the caching system.
14.9.1 What is Cachable 14.9.1 What is Cachable
By default, a response is cachable if the requirements of the request By default, a response is cachable if the requirements of the request
method, request header fields, and the response status indicate that it method, request header fields, and the response status indicate that it
is cachable. Section 13.4 summarizes these defaults for cachability. The is cachable. Section 13.4 summarizes these defaults for cachability. The
following Cache-Control response directives allow an origin server to following Cache-Control response directives allow an origin server to
override the default cachability of a response: override the default cachability of a response:
public public
skipping to change at page 95, line 28 skipping to change at page 97, line 24
Note: This usage of the word private only controls where the Note: This usage of the word private only controls where the
response may be cached, and cannot ensure the privacy of the response may be cached, and cannot ensure the privacy of the
message content. message content.
no-cache no-cache
Indicates that all or part of the response message MUST NOT be cached Indicates that all or part of the response message MUST NOT be cached
anywhere. This allows an origin server to prevent caching even by anywhere. This allows an origin server to prevent caching even by
caches that have been configured to return stale responses to client caches that have been configured to return stale responses to client
requests. requests.
Note: HTTP/1.0 caches will not recognize or obey this directive. Note: Most HTTP/1.0 caches will not recognize or obey this
directive.
14.9.2 What May be Stored by Caches 14.9.2 What May be Stored by Caches
The purpose of the no-store directive is to prevent the inadvertent The purpose of the no-store directive is to prevent the inadvertent
release or retention of sensitive information (for example, on backup release or retention of sensitive information (for example, on backup
tapes). The no-store directive applies to the entire message, and may be tapes). The no-store directive applies to the entire message, and may be
sent either in a response or in a request. If sent in a request, a cache sent either in a response or in a request. If sent in a request, a cache
MUST NOT store any part of either this request or any response to it. If MUST NOT store any part of either this request or any response to it. If
sent in a response, a cache MUST NOT store any part of either this sent in a response, a cache MUST NOT store any part of either this
response or the request that elicited it. This directive applies to both response or the request that elicited it. This directive applies to both
skipping to change at page 96, line 20 skipping to change at page 98, line 19
The expiration time of an entity may be specified by the origin server The expiration time of an entity may be specified by the origin server
using the Expires header (see section 14.21). Alternatively, it may be using the Expires header (see section 14.21). Alternatively, it may be
specified using the max-age directive in a response. specified using the max-age directive in a response.
If a response includes both an Expires header and a max-age directive, If a response includes both an Expires header and a max-age directive,
the max-age directive overrides the Expires header, even if the Expires the max-age directive overrides the Expires header, even if the Expires
header is more restrictive. This rule allows an origin server to header is more restrictive. This rule allows an origin server to
provide, for a given response, a longer expiration time to an HTTP/1.1 provide, for a given response, a longer expiration time to an HTTP/1.1
(or later) cache than to an HTTP/1.0 cache. This may be useful if (or later) cache than to an HTTP/1.0 cache. This may be useful if
certain HTTP/1.0 caches improperly calculate ages or expiration times, certain HTTP/1.0 caches improperly calculate ages or expiration times,
perhaps due to synchronized clocks. perhaps due to desynchronized clocks.
Note: most older caches, not compliant with this specification, do Note: most older caches, not compliant with this specification, do
not implement any Cache-Control directives. An origin server not implement any Cache-Control directives. An origin server
wishing to use a Cache-Control directive that restricts, but does wishing to use a Cache-Control directive that restricts, but does
not prevent, caching by an HTTP/1.1-compliant cache may exploit the not prevent, caching by an HTTP/1.1-compliant cache may exploit the
requirement that the max-age directive overrides the Expires requirement that the max-age directive overrides the Expires
header, and the fact that non-HTTP/1.1-compliant caches do not header, and the fact that non-HTTP/1.1-compliant caches do not
observe the max-age directive. observe the max-age directive.
Other directives allow an user agent to modify the basic expiration Other directives allow an user agent to modify the basic expiration
skipping to change at page 99, line 41 skipping to change at page 101, line 39
Serious operational problems have already occurred, however, when these Serious operational problems have already occurred, however, when these
transformations have been applied to entity bodies intended for certain transformations have been applied to entity bodies intended for certain
kinds of applications. For example, applications for medical imaging, kinds of applications. For example, applications for medical imaging,
scientific data analysis and those using end-to-end authentication, all scientific data analysis and those using end-to-end authentication, all
depend on receiving an entity body that is bit for bit identical to the depend on receiving an entity body that is bit for bit identical to the
original entity-body. original entity-body.
Therefore, if a response includes the no-transform directive, an Therefore, if a response includes the no-transform directive, an
intermediate cache or proxy MUST NOT change those headers that are intermediate cache or proxy MUST NOT change those headers that are
listed in section 13.5.2as being subject to the no-transform directive. listed in section 13.5.2 as being subject to the no-transform directive.
This implies that the cache or proxy must not change any aspect of the This implies that the cache or proxy must not change any aspect of the
entity-body that is specified by these headers. entity-body that is specified by these headers.
14.9.6 Cache Control Extensions 14.9.6 Cache Control Extensions
The Cache-Control header field can be extended through the use of one or The Cache-Control header field can be extended through the use of one or
more cache-extension tokens, each with an optional assigned value. more cache-extension tokens, each with an optional assigned value.
Informational extensions (those which do not require a change in cache Informational extensions (those which do not require a change in cache
behavior) may be added without changing the semantics of other behavior) may be added without changing the semantics of other
directives. Behavioral extensions are designed to work by acting as directives. Behavioral extensions are designed to work by acting as
skipping to change at page 101, line 24 skipping to change at page 103, line 22
connection should not be considered `persistent' (section 8.1) after the connection should not be considered `persistent' (section 8.1) after the
current request/response is complete. current request/response is complete.
HTTP/1.1 applications that do not support persistent connections MUST HTTP/1.1 applications that do not support persistent connections MUST
include the "close" connection option in every message. include the "close" connection option in every message.
14.11 Content-Base 14.11 Content-Base
The Content-Base entity-header field may be used to specify the base URI The Content-Base entity-header field may be used to specify the base URI
for resolving relative URLs within the entity. This header field is for resolving relative URLs within the entity. This header field is
described as Base in RFC 1808, which is expected to be revised soon. described as Base in RFC 1808, which is expected to be revised.
Content-Base = "Content-Base" ":" absoluteURI Content-Base = "Content-Base" ":" absoluteURI
If no Content-Base field is present, the base URI of an entity is If no Content-Base field is present, the base URI of an entity is
defined either by its Content-Location (if that Content-Location URI is defined either by its Content-Location (if that Content-Location URI is
an absolute URI) or the URI used to initiate the request, in that order an absolute URI) or the URI used to initiate the request, in that order
of precedence. Note, however, that the base URI of the contents within of precedence. Note, however, that the base URI of the contents within
the entity-body may be redefined within that entity-body. the entity-body may be redefined within that entity-body.
14.12 Content-Encoding 14.12 Content-Encoding
skipping to change at page 104, line 14 skipping to change at page 106, line 12
be used to differentiate between multiple entities retrieved from a be used to differentiate between multiple entities retrieved from a
single requested resource, as described in section 13.6. single requested resource, as described in section 13.6.
If the Content-Location is a relative URI, the URI is interpreted If the Content-Location is a relative URI, the URI is interpreted
relative to any Content-Base URI provided in the response. If no relative to any Content-Base URI provided in the response. If no
Content-Base is provided, the relative URI is interpreted relative to Content-Base is provided, the relative URI is interpreted relative to
the Request-URI. the Request-URI.
14.16 Content-MD5 14.16 Content-MD5
The Content-MD5 entity-header field, as defined in RFC 1864 [23] is a The Content-MD5 entity-header field, as defined in RFC 1864 [23], is an
MD5 digest of the entity-body, for the purpose of providing an end-to- MD5 digest of the entity-body for the purpose of providing an end-to-end
end message integrity check (MIC) of the entity-body. (Note: a MIC is message integrity check (MIC) of the entity-body. (Note: a MIC is good
good for detecting accidental modification of the entity-body in for detecting accidental modification of the entity-body in transit, but
transit, but is not proof against malicious attacks.) is not proof against malicious attacks.)
ContentMD5 = "Content-MD5" ":" md5-digest Content-MD5 = "Content-MD5" ":" md5-digest
md5-digest = <base64 of 128 bit MD5 digest as per RFC 1864> md5-digest = <base64 of 128 bit MD5 digest as per RFC 1864>
The Content-MD5 header field may be generated by an origin server to The Content-MD5 header field may be generated by an origin server to
function as an integrity check of the entity-body. Only origin servers function as an integrity check of the entity-body. Only origin servers
may generate the Content-MD5 header field; proxies and gateways MUST NOT may generate the Content-MD5 header field; proxies and gateways MUST NOT
generate it, as this would defeat its value as an end-to-end integrity generate it, as this would defeat its value as an end-to-end integrity
check. Any recipient of the entity-body, including gateways and proxies, check. Any recipient of the entity-body, including gateways and proxies,
MAY check that the digest value in this header field matches that of the MAY check that the digest value in this header field matches that of the
entity-body as received. entity-body as received.
skipping to change at page 105, line 26 skipping to change at page 107, line 23
digest is the transmission byte order defined for the type. Lastly, digest is the transmission byte order defined for the type. Lastly,
HTTP allows transmission of text types with any of several line HTTP allows transmission of text types with any of several line
break conventions and not just the canonical form using CRLF. break conventions and not just the canonical form using CRLF.
Conversion of all line breaks to CRLF should not be done before Conversion of all line breaks to CRLF should not be done before
computing or checking the digest: the line break convention used in computing or checking the digest: the line break convention used in
the text actually transmitted should be left unaltered when the text actually transmitted should be left unaltered when
computing the digest. computing the digest.
14.17 Content-Range 14.17 Content-Range
When a server returns a partial response to a client, it must describe The Content-Range entity-header is sent with a partial entity-body to
both the extent of the range covered by the response, and the length of specify where in the full entity-body the partial body should be
the entire entity-body. inserted. It also indicates the total size of the full entity-body. When
a server returns a partial response to a client, it must describe both
The Content-Range header is sent with a partial entity-body to specify the extent of the range covered by the response, and the length of the
where in the full entity-body the partial body should be inserted. It entire entity-body.
also indicates the total size of the full entity-body.
Content-Range = "Content-Range" ":" content-range-spec Content-Range = "Content-Range" ":" content-range-spec
content-range-spec = byte-content-range-spec content-range-spec = byte-content-range-spec
byte-content-range-spec = bytes-unit SP first-byte-pos "-" byte-content-range-spec = bytes-unit SP first-byte-pos "-"
last-byte-pos "/" entity-length last-byte-pos "/" entity-length
entity-length = 1*DIGIT entity-length = 1*DIGIT
skipping to change at page 106, line 8 skipping to change at page 107, line 52
A byte-content-range-spec whose last-byte-pos value is less than its A byte-content-range-spec whose last-byte-pos value is less than its
first-byte-pos value, or whose entity-length value is less than or equal first-byte-pos value, or whose entity-length value is less than or equal
to its last-byte-pos value, is invalid. The recipient of an invalid to its last-byte-pos value, is invalid. The recipient of an invalid
byte-content-range-spec MUST ignore it and any content transferred along byte-content-range-spec MUST ignore it and any content transferred along
with it. with it.
Examples of byte-content-range-spec values, assuming that the entity Examples of byte-content-range-spec values, assuming that the entity
contains a total of 1234 bytes: contains a total of 1234 bytes:
. The first 500 bytes: o The first 500 bytes:
bytes 0-499/1234 bytes 0-499/1234
o The second 500 bytes:
. The second 500 bytes:
bytes 500-999/1234 bytes 500-999/1234
. All except for the first 500 bytes: o All except for the first 500 bytes:
bytes 500-1233/1234 bytes 500-1233/1234
. The last 500 bytes: o The last 500 bytes:
bytes 734-1233/1234 bytes 734-1233/1234
When an HTTP message includes the content of a single range (for When an HTTP message includes the content of a single range (for
example, a response to a request for a single range, or to a request for example, a response to a request for a single range, or to a request for
a set of ranges that overlap without any holes), this content is a set of ranges that overlap without any holes), this content is
transmitted with a Content-Range header, and a Content-Length header transmitted with a Content-Range header, and a Content-Length header
showing the number of bytes actually transferred. For example, showing the number of bytes actually transferred. For example,
HTTP/1.1 206 Partial content HTTP/1.1 206 Partial content
Date: Wed, 15 Nov 1995 06:25:24 GMT Date: Wed, 15 Nov 1995 06:25:24 GMT
skipping to change at page 112, line 48 skipping to change at page 114, line 34
The If-None-Match request-header field is used with a method to make it The If-None-Match request-header field is used with a method to make it
conditional. A client that has one or more entities previously obtained conditional. A client that has one or more entities previously obtained
from the resource can verify that none of those entities is current by from the resource can verify that none of those entities is current by
including a list of their associated entity tags in the If-None-Match including a list of their associated entity tags in the If-None-Match
header field. The purpose of this feature is to allow efficient updates header field. The purpose of this feature is to allow efficient updates
of cached information with a minimum amount of transaction overhead. It of cached information with a minimum amount of transaction overhead. It
is also used, on updating requests, to prevent inadvertent modification is also used, on updating requests, to prevent inadvertent modification
of a resource which was not known to exist. of a resource which was not known to exist.
As a special case, the value "*" matches any current entity of the As a special case, the value "*" matches any current entity of the
resource. resource.
If-None-Match = "If-None-Match" ":" ( "*" | 1#entity-tag ) If-None-Match = "If-None-Match" ":" ( "*" | 1#entity-tag )
If any of the entity tags match the entity tag of the entity that would If any of the entity tags match the entity tag of the entity that would
have been returned in the response to a similar GET request (without the have been returned in the response to a similar GET request (without the
If-None-Match header) on that resource, or if "*" is given and any If-None-Match header) on that resource, or if "*" is given and any
current entity exists for that resource, then the server MUST NOT current entity exists for that resource, then the server MUST NOT
perform the requested method. Instead, if the request method was GET or perform the requested method. Instead, if the request method was GET or
HEAD, the server SHOULD respond with a 304 (Not Modified) response, HEAD, the server SHOULD respond with a 304 (Not Modified) response,
skipping to change at page 115, line 50 skipping to change at page 117, line 40
Note: The Content-Location header field (section 14.15) differs Note: The Content-Location header field (section 14.15) differs
from Location in that the Content-Location identifies the original from Location in that the Content-Location identifies the original
location of the entity enclosed in the request. It is therefore location of the entity enclosed in the request. It is therefore
possible for a response to contain header fields for both Location possible for a response to contain header fields for both Location
and Content-Location. Also see section 13.10 for cache requirements and Content-Location. Also see section 13.10 for cache requirements
of some methods. of some methods.
14.31 Max-Forwards 14.31 Max-Forwards
The Max-Forwards general-header field may be used with the TRACE method The Max-Forwards request-header field may be used with the TRACE method
(section 14.31) to limit the number of proxies or gateways that can (section 14.31) to limit the number of proxies or gateways that can
forward the request to the next inbound server. This can be useful when forward the request to the next inbound server. This can be useful when
the client is attempting to trace a request chain which appears to be the client is attempting to trace a request chain which appears to be
failing or looping in mid-chain. failing or looping in mid-chain.
Max-Forwards = "Max-Forwards" ":" 1*DIGIT Max-Forwards = "Max-Forwards" ":" 1*DIGIT
The Max-Forwards value is a decimal integer indicating the remaining The Max-Forwards value is a decimal integer indicating the remaining
number of times this request message may be forwarded. number of times this request message may be forwarded.
skipping to change at page 117, line 16 skipping to change at page 119, line 7
caches SHOULD treat "Pragma: no-cache" as if the client had sent "Cache- caches SHOULD treat "Pragma: no-cache" as if the client had sent "Cache-
Control: no-cache". No new Pragma directives will be defined in HTTP. Control: no-cache". No new Pragma directives will be defined in HTTP.
14.33 Proxy-Authenticate 14.33 Proxy-Authenticate
The Proxy-Authenticate response-header field MUST be included as part of The Proxy-Authenticate response-header field MUST be included as part of
a 407 (Proxy Authentication Required) response. The field value consists a 407 (Proxy Authentication Required) response. The field value consists
of a challenge that indicates the authentication scheme and parameters of a challenge that indicates the authentication scheme and parameters
applicable to the proxy for this Request-URI. applicable to the proxy for this Request-URI.
Proxy-Authentication = "Proxy-Authentication" ":" challenge Proxy-Authenticate = "Proxy-Authenticate" ":" challenge
The HTTP access authentication process is described in section 11. The HTTP access authentication process is described in section 11.
Unlike WWW-Authenticate, the Proxy-Authenticate header field applies Unlike WWW-Authenticate, the Proxy-Authenticate header field applies
only to the current connection and SHOULD NOT be passed on to downstream only to the current connection and SHOULD NOT be passed on to downstream
clients. However, an intermediate proxy may need to obtain its own clients. However, an intermediate proxy may need to obtain its own
credentials by requesting them from the downstream client, which in some credentials by requesting them from the downstream client, which in some
circumstances will appear as if the proxy is forwarding the Proxy- circumstances will appear as if the proxy is forwarding the Proxy-
Authenticate header field. Authenticate header field.
14.34 Proxy-Authorization 14.34 Proxy-Authorization
skipping to change at page 119, line 25 skipping to change at page 121, line 17
suffix-length = 1*DIGIT suffix-length = 1*DIGIT
A suffix-byte-range-spec is used to specify the suffix of the entity- A suffix-byte-range-spec is used to specify the suffix of the entity-
body, of a length given by the suffix-length value. (That is, this form body, of a length given by the suffix-length value. (That is, this form
specifies the last N bytes of an entity-body.) If the entity is shorter specifies the last N bytes of an entity-body.) If the entity is shorter
than the specified suffix-length, the entire entity-body is used. than the specified suffix-length, the entire entity-body is used.
Examples of byte-ranges-specifier values (assuming an entity-body of Examples of byte-ranges-specifier values (assuming an entity-body of
length 10000): length 10000):
. The first 500 bytes (byte offsets 0-499, inclusive): o The first 500 bytes (byte offsets 0-499, inclusive):
bytes=0-499 bytes=0-499
. The second 500 bytes (byte offsets 500-999, inclusive): o The second 500 bytes (byte offsets 500-999, inclusive):
bytes=500-999 bytes=500-999
. The final 500 bytes (byte offsets 9500-9999, inclusive): o The final 500 bytes (byte offsets 9500-9999, inclusive):
bytes=-500 bytes=-500
. Or o Or
bytes=9500- bytes=9500-
. The first and last bytes only (bytes 0 and 9999): o The first and last bytes only (bytes 0 and 9999):
bytes=0-0,-1 bytes=0-0,-1
. Several legal but not canonical specifications of the second 500 o Several legal but not canonical specifications of the second 500
bytes (byte offsets 500-999, inclusive): bytes (byte offsets 500-999, inclusive):
bytes=500-600,601-999 bytes=500-600,601-999
bytes=500-700,601-999 bytes=500-700,601-999
14.36.2 Range Retrieval Requests 14.36.2 Range Retrieval Requests
HTTP retrieval requests using conditional or unconditional GET methods HTTP retrieval requests using conditional or unconditional GET methods
may request one or more sub-ranges of the entity, instead of the entire may request one or more sub-ranges of the entity, instead of the entire
entity, using the Range request header, which applies to the entity entity, using the Range request header, which applies to the entity
returned as the result of the request: returned as the result of the request:
skipping to change at page 120, line 4 skipping to change at page 121, line 52
bytes=500-700,601-999 bytes=500-700,601-999
14.36.2 Range Retrieval Requests 14.36.2 Range Retrieval Requests
HTTP retrieval requests using conditional or unconditional GET methods HTTP retrieval requests using conditional or unconditional GET methods
may request one or more sub-ranges of the entity, instead of the entire may request one or more sub-ranges of the entity, instead of the entire
entity, using the Range request header, which applies to the entity entity, using the Range request header, which applies to the entity
returned as the result of the request: returned as the result of the request:
Range = "Range" ":" ranges-specifier Range = "Range" ":" ranges-specifier
A server MAY ignore the Range header. However, HTTP/1.1 origin servers A server MAY ignore the Range header. However, HTTP/1.1 origin servers
and intermediate caches SHOULD support byte ranges when possible, since and intermediate caches SHOULD support byte ranges when possible, since
Range supports efficient recovery from partially failed transfers, and Range supports efficient recovery from partially failed transfers, and
supports efficient partial retrieval of large entities. supports efficient partial retrieval of large entities.
If the server supports the Range header and the specified range or If the server supports the Range header and the specified range or
ranges are appropriate for the entity: ranges are appropriate for the entity:
. The presence of a Range header in an unconditional GET modifies o The presence of a Range header in an unconditional GET modifies
what is returned if the GET is otherwise successful. In other what is returned if the GET is otherwise successful. In other
words, the response carries a status code of 206 (Partial Content) words, the response carries a status code of 206 (Partial Content)
instead of 200 (OK). instead of 200 (OK).
. The presence of a Range header in a conditional GET (a request
o The presence of a Range header in a conditional GET (a request
using one or both of If-Modified-Since and If-None-Match, or one or using one or both of If-Modified-Since and If-None-Match, or one or
both of If-Unmodified-Since and If-Match) modifies what is returned both of If-Unmodified-Since and If-Match) modifies what is returned
if the GET is otherwise successful and the condition is true. It if the GET is otherwise successful and the condition is true. It
does not affect the 304 (Not Modified) response returned if the does not affect the 304 (Not Modified) response returned if the
conditional is false. conditional is false.
In some cases, it may be more appropriate to use the If-Range header In some cases, it may be more appropriate to use the If-Range header
(see section 14.27) in addition to the Range header. (see section 14.27) in addition to the Range header.
If a proxy that supports byte ranges receives a Range request, forwards If a proxy that supports ranges receives a Range request, forwards the
the request to an inbound server, and receives an entire entity in request to an inbound server, and receives an entire entity in reply, it
reply, it SHOULD only return the requested range to its client. It SHOULD only return the requested range to its client. It SHOULD store
SHOULD store the entire received response in its cache, if that is the entire received response in its cache, if that is consistent with
consistent with its cache allocation policies. its cache allocation policies.
14.37 Referer 14.37 Referer
The Referer[sic] request-header field allows the client to specify, for The Referer[sic] request-header field allows the client to specify, for
the server's benefit, the address (URI) of the resource from which the the server's benefit, the address (URI) of the resource from which the
Request-URI was obtained (the "referrer", although the header field is Request-URI was obtained (the "referrer", although the header field is
misspelled.) The Referer request-header allows a server to generate misspelled.) The Referer request-header allows a server to generate
lists of back-links to resources for interest, logging, optimized lists of back-links to resources for interest, logging, optimized
caching, etc. It also allows obsolete or mistyped links to be traced for caching, etc. It also allows obsolete or mistyped links to be traced for
maintenance. The Referer field MUST NOT be sent if the Request-URI was maintenance. The Referer field MUST NOT be sent if the Request-URI was
skipping to change at page 127, line 22 skipping to change at page 129, line 22
Warning headers previously attached to that entry except as specified Warning headers previously attached to that entry except as specified
for specific Warning codes. It MUST then add any Warning headers for specific Warning codes. It MUST then add any Warning headers
received in the validating response. In other words, Warning headers are received in the validating response. In other words, Warning headers are
those that would be attached to the most recent relevant response. those that would be attached to the most recent relevant response.
When multiple Warning headers are attached to a response, the user agent When multiple Warning headers are attached to a response, the user agent
SHOULD display as many of them as possible, in the order that they SHOULD display as many of them as possible, in the order that they
appear in the response. If it is not possible to display all of the appear in the response. If it is not possible to display all of the
warnings, the user agent should follow these heuristics: warnings, the user agent should follow these heuristics:
. Warnings that appear early in the response take priority over those o Warnings that appear early in the response take priority over those
appearing later in the response. appearing later in the response.
. Warnings in the user's preferred character set take priority over o Warnings in the user's preferred character set take priority over
warnings in other character sets but with identical warn-codes and warnings in other character sets but with identical warn-codes and
warn-agents. warn-agents.
Systems that generate multiple Warning headers should order them with Systems that generate multiple Warning headers should order them with
this user agent behavior in mind. this user agent behavior in mind.
This is a list of the currently-defined warn-codes, each with a This is a list of the currently-defined warn-codes, each with a
recommended warn-text in English, and a description of its meaning. recommended warn-text in English, and a description of its meaning.
10 Response is stale 10 Response is stale
MUST be included whenever the returned response is stale. A cache may MUST be included whenever the returned response is stale. A cache may
skipping to change at page 133, line 34 skipping to change at page 135, line 34
If a single server supports multiple organizations that do not trust one If a single server supports multiple organizations that do not trust one
another, then it must check the values of Location and Content-Location another, then it must check the values of Location and Content-Location
headers in responses that are generated under control of said headers in responses that are generated under control of said
organizations to make sure that they do not attempt to invalidate organizations to make sure that they do not attempt to invalidate
resources over which they have no authority. resources over which they have no authority.
16 Acknowledgments 16 Acknowledgments
This specification makes heavy use of the augmented BNF and generic This specification makes heavy use of the augmented BNF and generic
constructs defined by David H. Crocker for RFC 822 . Similarly, it constructs defined by David H. Crocker for RFC 822. Similarly, it
reuses many of the definitions provided by Nathaniel Borenstein and Ned reuses many of the definitions provided by Nathaniel Borenstein and Ned
Freed for MIME . We hope that their inclusion in this specification will Freed for MIME. We hope that their inclusion in this specification will
help reduce past confusion over the relationship between HTTP and help reduce past confusion over the relationship between HTTP and
Internet mail message formats. Internet mail message formats.
The HTTP protocol has evolved considerably over the past four years. It The HTTP protocol has evolved considerably over the past four years. It
has benefited from a large and active developer community--the many has benefited from a large and active developer community--the many
people who have participated on the www-talk mailing list--and it is people who have participated on the www-talk mailing list--and it is
that community which has been most responsible for the success of HTTP that community which has been most responsible for the success of HTTP
and of the World-Wide Web in general. Marc Andreessen, Robert Cailliau, and of the World-Wide Web in general. Marc Andreessen, Robert Cailliau,
Daniel W. Connolly, Bob Denny, John Franks, Jean-Francois Groff, Phillip Daniel W. Connolly, Bob Denny, John Franks, Jean-Francois Groff, Phillip
M. Hallam-Baker, Hakon W. Lie, Ari Luotonen, Rob McCool, Lou Montulli, M. Hallam-Baker, Hakon W. Lie, Ari Luotonen, Rob McCool, Lou Montulli,
skipping to change at page 134, line 30 skipping to change at page 136, line 30
Bob Jernigan Allan M. Schiffman Bob Jernigan Allan M. Schiffman
Shel Kaphan Jim Seidman Shel Kaphan Jim Seidman
Rohit Khare Chuck Shotton Rohit Khare Chuck Shotton
John Klensin Eric W. Sink John Klensin Eric W. Sink
Martijn Koster Simon E. Spero Martijn Koster Simon E. Spero
Alexei Kosut Richard N. Taylor Alexei Kosut Richard N. Taylor
David M. Kristol Robert S. Thau David M. Kristol Robert S. Thau
Daniel LaLiberte Bill (BearHeart) Weinman Daniel LaLiberte Bill (BearHeart) Weinman
Ben Laurie Francois Yergeau Ben Laurie Francois Yergeau
Paul J. Leach Mary Ellen Zurko Paul J. Leach Mary Ellen Zurko
Daniel DuBois
Much of the content and presentation of the caching design is due to Much of the content and presentation of the caching design is due to
suggestions and comments from individuals including: Shel Kaphan, Paul suggestions and comments from individuals including: Shel Kaphan, Paul
Leach, Koen Holtman, David Morris, and Larry Masinter. Leach, Koen Holtman, David Morris, and Larry Masinter.
Most of the specification of ranges is based on work originally done by Most of the specification of ranges is based on work originally done by
Ari Luotonen and John Franks, with additional input from Steve Zilles. Ari Luotonen and John Franks, with additional input from Steve Zilles.
Thanks to the "cave men" of Palo Alto. You know who you are. Thanks to the "cave men" of Palo Alto. You know who you are.
skipping to change at page 134, line 48 skipping to change at page 136, line 49
Thanks to the "cave men" of Palo Alto. You know who you are. Thanks to the "cave men" of Palo Alto. You know who you are.
Jim Gettys (the current editor of this document) wishes particularly to Jim Gettys (the current editor of this document) wishes particularly to
thank Roy Fielding, the previous editor of this document, along with thank Roy Fielding, the previous editor of this document, along with
John Klensin, Jeff Mogul, Paul Leach, Dave Kristol, Koen Holtman, John John Klensin, Jeff Mogul, Paul Leach, Dave Kristol, Koen Holtman, John
Franks, Alex Hopmann, and Larry Masinter for their help. Franks, Alex Hopmann, and Larry Masinter for their help.
17 References 17 References
[1] H. Alvestrand. "Tags for the identification of languages." RFC [1] H. Alvestrand. "Tags for the identification of languages." RFC
1766, UNINETT, March 1995. 1766, UNINETT, March 1995.
[2] F. Anklesaria, M. McCahill, P. Lindner, D. Johnson, D. Torrey, [2] F. Anklesaria, M. McCahill, P. Lindner, D. Johnson, D. Torrey,
B. Alberti. "The Internet Gopher Protocol: (a distributed document B. Alberti. "The Internet Gopher Protocol: (a distributed document
search and retrieval protocol)", RFC 1436, University of Minnesota, search and retrieval protocol)", RFC 1436, University of Minnesota,
March 1993. March 1993.
[3] T. Berners-Lee. "Universal Resource Identifiers in WWW." A [3] T. Berners-Lee. "Universal Resource Identifiers in WWW." A
Unifying Syntax for the Expression of Names and Addresses of Objects Unifying Syntax for the Expression of Names and Addresses of Objects
on the Network as used in the World-Wide Web." RFC 1630, CERN, June on the Network as used in the World-Wide Web." RFC 1630, CERN, June
1994. 1994.
[4] T. Berners-Lee, L. Masinter, M. McCahill. [4] T. Berners-Lee, L. Masinter, M. McCahill.
"Uniform Resource Locators (URL)." RFC 1738, CERN, Xerox PARC, "Uniform Resource Locators (URL)." RFC 1738, CERN, Xerox PARC,
University of Minnesota, December 1994. University of Minnesota, December 1994.
[5] T. Berners-Lee, D. Connolly. [5] T. Berners-Lee, D. Connolly.
"HyperText Markup Language Specification - 2.0." RFC 1866, MIT/LCS, "HyperText Markup Language Specification - 2.0." RFC 1866, MIT/LCS,
November 1995. November 1995.
[6] T. Berners-Lee, R. Fielding, H. Frystyk. [6] T. Berners-Lee, R. Fielding, H. Frystyk.
"Hypertext Transfer Protocol -- HTTP/1.0." RFC 1945." MIT/LCS, UC "Hypertext Transfer Protocol -- HTTP/1.0." RFC 1945." MIT/LCS, UC
Irvine, May 1996. Irvine, May 1996.
[7] N. Borenstein, N. Freed. [7] N. Borenstein, N. Freed.
"MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms "MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms
for Specifying and Describing the Format of Internet Message Bodies." for Specifying and Describing the Format of Internet Message Bodies."
RFC 1521, Bellcore, Innosoft, September 1993. RFC 1521, Bellcore, Innosoft, September 1993.
[8] R. Braden. [8] R. Braden.
"Requirements for Internet hosts - application and support." STD 3, "Requirements for Internet hosts - application and support." STD 3,
RFC 1123, IETF, October 1989. RFC 1123, IETF, October 1989.
[9] D. H. Crocker. [9] D. H. Crocker.
"Standard for the Format of ARPA Internet Text Messages." STD 11, RFC "Standard for the Format of ARPA Internet Text Messages." STD 11, RFC
822, UDEL, August 1982. 822, UDEL, August 1982.
[10] F. Davis, B. Kahle, H. Morris, J. Salem, T. Shen, R. Wang, J. [10] F. Davis, B. Kahle, H. Morris, J. Salem, T. Shen, R. Wang, J.
Sui, M. Grinbaum. "WAIS Interface Protocol Prototype Functional Sui, M. Grinbaum. "WAIS Interface Protocol Prototype Functional
Specification." (v1.5), Thinking Machines Corporation, April 1990. Specification." (v1.5), Thinking Machines Corporation, April 1990.
[11] R. Fielding. "Relative Uniform Resource Locators." RFC 1808, UC [11] R. Fielding. "Relative Uniform Resource Locators." RFC 1808, UC
Irvine, June 1995. Irvine, June 1995.
[12] M. Horton, R. Adams. [12] M. Horton, R. Adams. "Standard for interchange of USENET
"Standard for interchange of USENET messages." RFC 1036 (Obsoletes messages." RFC 1036 (Obsoletes RFC 850), AT&T Bell Laboratories,
Center for Seismic Studies, December 1987.
RFC 850), AT&T Bell Laboratories, Center for Seismic Studies,
December 1987.
[13] B. Kantor, P. Lapsley. "Network News Transfer Protocol." A [13] B. Kantor, P. Lapsley. "Network News Transfer Protocol." A
Proposed Standard for the Stream-Based Transmission of News." RFC Proposed Standard for the Stream-Based Transmission of News." RFC
977, UC San Diego, UC Berkeley, February 1986. 977, UC San Diego, UC Berkeley, February 1986.
[14] K. Moore. "MIME (Multipurpose Internet Mail Extensions) Part Two [14] K. Moore. "MIME (Multipurpose Internet Mail Extensions) Part Two:
Message Header Extensions for Non-ASCII Text." RFC 1522, University
: Message Header Extensions for Non-ASCII Text." RFC 1522, University
of Tennessee, September 1993. of Tennessee, September 1993.
[15] E. Nebel, L. Masinter. "Form-based File Upload in HTML." RFC [15] E. Nebel, L. Masinter. "Form-based File Upload in HTML." RFC
1867, Xerox Corporation, November 1995. 1867, Xerox Corporation, November 1995.
[16] J. Postel. "Simple Mail Transfer Protocol." STD 10, RFC 821, [16] J. Postel. "Simple Mail Transfer Protocol." STD 10, RFC 821,
USC/ISI, August 1982. USC/ISI, August 1982.
[17] J. Postel. "Media Type Registration Procedure." RFC 1590, [17] J. Postel. "Media Type Registration Procedure." RFC 1590,
USC/ISI, March 1994. USC/ISI, March 1994.
[18] J. Postel, J. K. Reynolds. "File Transfer Protocol (FTP)." STD [18] J. Postel, J. K. Reynolds. "File Transfer Protocol (FTP)." STD
9, RFC 959, USC/ISI, October 1985. 9, RFC 959, USC/ISI, October 1985.
[19] J. Reynolds, J. Postel. "Assigned Numbers." STD 2, RFC 1700, [19] J. Reynolds, J. Postel. "Assigned Numbers." STD 2, RFC 1700,
USC/ISI, October 1994. USC/ISI, October 1994.
[20] K. Sollins, L. Masinter. [20] K. Sollins, L. Masinter.
"Functional Requirements for Uniform Resource Names." RFC 1737, "Functional Requirements for Uniform Resource Names." RFC 1737,
MIT/LCS, Xerox Corporation, December 1994. MIT/LCS, Xerox Corporation, December 1994.
[21] US-ASCII. Coded Character Set - 7-Bit American Standard Code for [21] US-ASCII. Coded Character Set - 7-Bit American Standard Code for
Information Interchange. Standard ANSI X3.4-1986, ANSI, 1986. Information Interchange. Standard ANSI X3.4-1986, ANSI, 1986.
[22] ISO-8859. International Standard -- Information Processing -- [22] ISO-8859. International Standard -- Information Processing --
8-bit Single-Byte Coded Graphic Character Sets -- 8-bit Single-Byte Coded Graphic Character Sets --
Part 1: Latin alphabet No. 1, ISO 8859-1:1987. Part 1: Latin alphabet No. 1, ISO 8859-1:1987.
Part 2: Latin alphabet No. 2, ISO 8859-2, 1987. Part 2: Latin alphabet No. 2, ISO 8859-2, 1987.
Part 3: Latin alphabet No. 3, ISO 8859-3, 1988. Part 3: Latin alphabet No. 3, ISO 8859-3, 1988.
skipping to change at page 137, line 30 skipping to change at page 139, line 6
Part 2: Latin alphabet No. 2, ISO 8859-2, 1987. Part 2: Latin alphabet No. 2, ISO 8859-2, 1987.
Part 3: Latin alphabet No. 3, ISO 8859-3, 1988. Part 3: Latin alphabet No. 3, ISO 8859-3, 1988.
Part 4: Latin alphabet No. 4, ISO 8859-4, 1988. Part 4: Latin alphabet No. 4, ISO 8859-4, 1988.
Part 5: Latin/Cyrillic alphabet, ISO 8859-5, 1988. Part 5: Latin/Cyrillic alphabet, ISO 8859-5, 1988.
Part 6: Latin/Arabic alphabet, ISO 8859-6, 1987. Part 6: Latin/Arabic alphabet, ISO 8859-6, 1987.
Part 7: Latin/Greek alphabet, ISO 8859-7, 1987. Part 7: Latin/Greek alphabet, ISO 8859-7, 1987.
Part 8: Latin/Hebrew alphabet, ISO 8859-8, 1988. Part 8: Latin/Hebrew alphabet, ISO 8859-8, 1988.
Part 9: Latin alphabet No. 5, ISO 8859-9, 1990. Part 9: Latin alphabet No. 5, ISO 8859-9, 1990.
[23] Meyers, M. Rose "The Content-MD5 Header Field." RFC 1864, [23] Meyers, M. Rose "The Content-MD5 Header Field." RFC 1864,
Carnegie Mellon, Dover Beach Consulting, October, 1995. Carnegie Mellon, Dover Beach Consulting, October, 1995.
[24] B. Carpenter, Y. Rekhter, "Renumbering Needs Work." RFC 1900, [24] B. Carpenter, Y. Rekhter, "Renumbering Needs Work." RFC 1900,
IAB, February 1996. IAB, February 1996.
[25] P. Deutsch, "GZIP file format specification version 4.3." RFC [25] P. Deutsch, "GZIP file format specification version 4.3." RFC
1952, Aladdin Enterprises, May, 1996. 1952, Aladdin Enterprises, May, 1996.
[26] Jeffrey C. Mogul. "The Case for Persistent-Connection HTTP". In [26] Jeffrey C. Mogul. "The Case for Persistent-Connection HTTP". In
Proc. SIGCOMM '95 Symposium on Communications Architectures and Proc. SIGCOMM '95 Symposium on Communications Architectures and
Protocols, pages 299-313. Cambridge, MA, August, 1995. A longer, more Protocols, pages 299-313. Cambridge, MA, August, 1995. A longer, more
comprehensive version of this paper is available on line at comprehensive version of this paper is available on line at
<URL <http://www.research.digital.com/wrl/techreports/abstracts/95.4.html>,
:http://www.research.digital.com/wrl/techreports/abstracts/95.4.html Digital Equipment Corporation Western Research Laboratory Research
>, Digital Equipment Corporation Western Research Laboratory Research
Report 95/4, May, 1995., Report 95/4, May, 1995.,
[27] Work in progress on content negotiation of the HTTP working
group.
[28] Mills, D, "Network Time Protocol, Version 3.", Specification, [28] Mills, D, "Network Time Protocol, Version 3.", Specification,
Implementation and Analysis RFC 1305, University of Delaware, March, Implementation and Analysis RFC 1305, University of Delaware, March,
1992. 1992.
[29] P. Deutsch, [29] P. Deutsch, "DEFLATE Compressed Data Format Specification version
"DEFLATE Compressed Data Format Specification version 1.3." RFC 1951, 1.3." RFC 1951, Aladdin Enterprises, May 1996.
Aladdin Enterprises, May 1996.
[30] S. Spero. "Analysis of HTTP Performance Problems" [30] S. Spero. "Analysis of HTTP Performance Problems"
<URL:http://sunsite.unc.edu/mdma-release/http-prob.html> <URL:http://sunsite.unc.edu/mdma-release/http-prob.html>, Joe Touch,
John Heidemann, and Katia Obraczka, "Analysis of HTTP Performance",
[31] P. Deutsch, J-L. Gailly, <URL: http://www.isi.edu/lsam/ib/http-perf/>, USC/Information Sciences
"ZLIB Compressed Data Format Specification version 3.3." RFC 1950, Institute, June 1996
Aladdin Enterprises, Info-ZIP, May 1996. [31] P. Deutsch, J-L. Gailly, "ZLIB Compressed Data Format Specification
version 3.3." RFC 1950, Aladdin Enterprises, Info-ZIP, May 1996.
[32] Work In Progress for Digest authentication of the IETF HTTP [32] Work In Progress for Digest authentication of the IETF HTTP
working group. working group.
18 Authors' Addresses 18 Authors' Addresses
Roy T. Fielding Roy T. Fielding
Department of Information and Computer Science Department of Information and Computer Science
University of California University of California
Irvine, CA 92717-3425, USA Irvine, CA 92717-3425, USA
Fax: +1 (714) 824-4056 Fax: +1 (714) 824-4056
Email: fielding@ics.uci.edu Email: fielding@ics.uci.edu
Jim Gettys Jim Gettys
MIT Laboratory for Computer Science MIT Laboratory for Computer Science
545 Technology Square 545 Technology Square
Cambridge, MA 02139, USA Cambridge, MA 02139, USA
Fax: +1 (617) 258 8682 Fax: +1 (617) 258 8682
Email: jg@w3.org Email: jg@w3.org
Jeffrey C. Mogul
Jeffrey C. Mogul
Western Research Laboratory Western Research Laboratory
Digital Equipment Corporation Digital Equipment Corporation
250 University Avenue 250 University Avenue
Palo Alto, California, 94305, USA Palo Alto, California, 94305, USA
Email: mogul@wrl.dec.com Email: mogul@wrl.dec.com
Henrik Frystyk Nielsen Henrik Frystyk Nielsen
W3 Consortium W3 Consortium
MIT Laboratory for Computer Science MIT Laboratory for Computer Science
545 Technology Square 545 Technology Square
Cambridge, MA 02139, USA Cambridge, MA 02139, USA
Fax: +1 (617) 258 8682 Fax: +1 (617) 258 8682
Email: frystyk@w3.org Email: frystyk@w3.org
Tim Berners-Lee Tim Berners-Lee
Director, W3 Consortium Director, W3 Consortium
MIT Laboratory for Computer Science MIT Laboratory for Computer Science
545 Technology Square 545 Technology Square
Cambridge, MA 02139, USA Cambridge, MA 02139, USA
Fax: +1 (617) 258 8682 Fax: +1 (617) 258 8682
Email: timbl@w3.org Email: timbl@w3.org
19 Appendices 19 Appendices
19.1 Internet Media Type message/http 19.1 Internet Media Type message/http
In addition to defining the HTTP/1.1 protocol, this document serves as In addition to defining the HTTP/1.1 protocol, this document serves as
the specification for the Internet media type "message/http". The the specification for the Internet media type "message/http". The
following is to be registered with IANA . following is to be registered with IANA.
Media Type name: message Media Type name: message
Media subtype name: http Media subtype name: http
Required parameters: none Required parameters: none
Optional parameters: version, msgtype Optional parameters: version, msgtype
version: The HTTP-Version number of the enclosed message version: The HTTP-Version number of the enclosed message
(e.g., "1.1"). If not present, the version can be (e.g., "1.1"). If not present, the version can be
determined from the first line of the body. determined from the first line of the body.
skipping to change at page 141, line 22 skipping to change at page 142, line 47
recognize a single LF as a line terminator and ignore the leading CR. recognize a single LF as a line terminator and ignore the leading CR.
The character set of an entity-body should be labeled as the lowest The character set of an entity-body should be labeled as the lowest
common denominator of the character codes used within that body, with common denominator of the character codes used within that body, with
the exception that no label is preferred over the labels US-ASCII or the exception that no label is preferred over the labels US-ASCII or
ISO-8859-1. ISO-8859-1.
Additional rules for requirements on parsing and encoding of dates and Additional rules for requirements on parsing and encoding of dates and
other potential problems with date encodings include: other potential problems with date encodings include:
. HTTP/1.1 clients and caches should assume that an RFC-850 date o HTTP/1.1 clients and caches should assume that an RFC-850 date
which appears to be more than 50 years in the future is in fact in which appears to be more than 50 years in the future is in fact in
the past (this helps solve the "year 2000" problem). the past (this helps solve the "year 2000" problem).
. An HTTP/1.1 implementation may internally represent a parsed
o An HTTP/1.1 implementation may internally represent a parsed
Expires date as earlier than the proper value, but MUST NOT Expires date as earlier than the proper value, but MUST NOT
internally represent a parsed Expires date as later than the proper internally represent a parsed Expires date as later than the proper
value. value.
. All expiration-related calculations must be done in GMT. The local
o All expiration-related calculations must be done in GMT. The local
time zone MUST NOT influence the calculation or comparison of an time zone MUST NOT influence the calculation or comparison of an
age or expiration time. age or expiration time.
. If an HTTP header incorrectly carries a date value with a time zone
o If an HTTP header incorrectly carries a date value with a time zone
other than GMT, it must be converted into GMT using the most other than GMT, it must be converted into GMT using the most
conservative possible conversion. conservative possible conversion.
19.4 Differences Between HTTP Entities and RFC 1521 Entities 19.4 Differences Between HTTP Entities and RFC 1521 Entities
HTTP/1.1 uses many of the constructs defined for Internet Mail (RFC 822 HTTP/1.1 uses many of the constructs defined for Internet Mail (RFC 822)
) and the Multipurpose Internet Mail Extensions (MIME ) to allow and the Multipurpose Internet Mail Extensions (MIME ) to allow
entities to be transmitted in an open variety of representations and entities to be transmitted in an open variety of representations and
with extensible mechanisms. However, RFC 1521 discusses mail, and HTTP with extensible mechanisms. However, RFC 1521 discusses mail, and HTTP
has a few features that are different from those described in RFC 1521. has a few features that are different from those described in RFC 1521.
These differences were carefully chosen to optimize performance over These differences were carefully chosen to optimize performance over
binary connections, to allow greater freedom in the use of new media binary connections, to allow greater freedom in the use of new media
types, to make date comparisons easier, and to acknowledge the practice types, to make date comparisons easier, and to acknowledge the practice
of some early HTTP servers and clients. of some early HTTP servers and clients.
At the time of this writing, it is expected that RFC 1521 will be At the time of this writing, it is expected that RFC 1521 will be
revised. The revisions may include some of the practices found in revised. The revisions may include some of the practices found in
skipping to change at page 142, line 10 skipping to change at page 143, line 38
This appendix describes specific areas where HTTP differs from RFC 1521. This appendix describes specific areas where HTTP differs from RFC 1521.
Proxies and gateways to strict MIME environments SHOULD be aware of Proxies and gateways to strict MIME environments SHOULD be aware of
these differences and provide the appropriate conversions where these differences and provide the appropriate conversions where
necessary. Proxies and gateways from MIME environments to HTTP also need necessary. Proxies and gateways from MIME environments to HTTP also need
to be aware of the differences because some conversions may be required. to be aware of the differences because some conversions may be required.
19.4.1 Conversion to Canonical Form 19.4.1 Conversion to Canonical Form
RFC 1521 requires that an Internet mail entity be converted to canonical RFC 1521 requires that an Internet mail entity be converted to canonical
form prior to being transferred, as described in Appendix G of RFC 1521 form prior to being transferred, as described in Appendix G of RFC 1521.
. Section 3.7.1 of this document describes the forms allowed for Section 3.7.1 of this document describes the forms allowed for
subtypes of the "text" media type when transmitted over HTTP. RFC 1521 subtypes of the "text" media type when transmitted over HTTP. RFC 1521
requires that content with a type of "text" represent line breaks as requires that content with a type of "text" represent line breaks as
CRLF and forbids the use of CR or LF outside of line break sequences. CRLF and forbids the use of CR or LF outside of line break sequences.
HTTP allows CRLF, bare CR, and bare LF to indicate a line break within HTTP allows CRLF, bare CR, and bare LF to indicate a line break within
text content when a message is transmitted over HTTP. text content when a message is transmitted over HTTP.
Where it is possible, a proxy or gateway from HTTP to a strict RFC 1521 Where it is possible, a proxy or gateway from HTTP to a strict RFC 1521
environment SHOULD translate all line breaks within the text media types environment SHOULD translate all line breaks within the text media types
described in section 3.7.1 of this document to the RFC 1521 canonical described in section 3.7.1 of this document to the RFC 1521 canonical
form of CRLF. Note, however, that this may be complicated by the form of CRLF. Note, however, that this may be complicated by the
skipping to change at page 144, line 43 skipping to change at page 146, line 20
multiple Web sites from a single IP address, greatly simplifying large multiple Web sites from a single IP address, greatly simplifying large
operational Web servers, where allocation of many IP addresses to a operational Web servers, where allocation of many IP addresses to a
single host has created serious problems. The Internet will also be able single host has created serious problems. The Internet will also be able
to recover the IP addresses that have been allocated for the sole to recover the IP addresses that have been allocated for the sole
purpose of allowing special-purpose domain names to be used in root- purpose of allowing special-purpose domain names to be used in root-
level HTTP URLs. Given the rate of growth of the Web, and the number of level HTTP URLs. Given the rate of growth of the Web, and the number of
servers already deployed, it is extremely important that all servers already deployed, it is extremely important that all
implementations of HTTP (including updates to existing HTTP/1.0 implementations of HTTP (including updates to existing HTTP/1.0
applications) correctly implement these requirements: applications) correctly implement these requirements:
. Both clients and servers MUST support the Host request-header. o Both clients and servers MUST support the Host request-header.
. Host request-headers are required in HTTP/1.1 requests. o Host request-headers are required in HTTP/1.1 requests.
. Servers MUST report a 400 (Bad Request) error if an HTTP/1.1 o Servers MUST report a 400 (Bad Request) error if an HTTP/1.1
request does not include a Host request-header. request does not include a Host request-header.
. Servers MUST accept absolute URIs. o Servers MUST accept absolute URIs.
19.6 Additional Features 19.6 Additional Features
This appendix documents protocol elements used by some existing HTTP This appendix documents protocol elements used by some existing HTTP
implementations, but not consistently and correctly across most HTTP/1.1 implementations, but not consistently and correctly across most HTTP/1.1
applications. Implementers should be aware of these features, but cannot applications. Implementers should be aware of these features, but cannot
rely upon their presence in, or interoperability with, other HTTP/1.1 rely upon their presence in, or interoperability with, other HTTP/1.1
applications. Some of these describe proposed experimental features, and applications. Some of these describe proposed experimental features, and
some describe features that experimental deployment found lacking that some describe features that experimental deployment found lacking that
are now addressed in the base HTTP/1.1 specification. are now addressed in the base HTTP/1.1 specification.
skipping to change at page 147, line 49 skipping to change at page 149, line 28
Content-Version header was included with the entity when it was last Content-Version header was included with the entity when it was last
retrieved. retrieved.
19.6.2.4 Link 19.6.2.4 Link
The Link entity-header field provides a means for describing a The Link entity-header field provides a means for describing a
relationship between two resources, generally between the requested relationship between two resources, generally between the requested
resource and some other resource. An entity MAY include multiple Link resource and some other resource. An entity MAY include multiple Link
values. Links at the metainformation level typically indicate values. Links at the metainformation level typically indicate
relationships like hierarchical structure and navigation paths. The Link relationships like hierarchical structure and navigation paths. The Link
field is semantically equivalent to the <LINK> element in HTML . field is semantically equivalent to the <LINK> element in HTML.
Link = "Link" ":" #("<" URI ">" *( ";" link-param ) Link = "Link" ":" #("<" URI ">" *( ";" link-param )
link-param = ( ( "rel" "=" relationship ) link-param = ( ( "rel" "=" relationship )
| ( "rev" "=" relationship ) | ( "rev" "=" relationship )
| ( "title" "=" quoted-string ) | ( "title" "=" quoted-string )
| ( "anchor" "=" <"> URI <"> ) | ( "anchor" "=" <"> URI <"> )
| ( link-extension ) ) | ( link-extension ) )
link-extension = token [ "=" ( token | quoted-string ) ] link-extension = token [ "=" ( token | quoted-string ) ]
relationship = sgml-name relationship = sgml-name
| ( <"> sgml-name *( SP sgml-name) <"> ) | ( <"> sgml-name *( SP sgml-name) <"> )
skipping to change at page 149, line 4 skipping to change at page 150, line 29
primary purpose has been to include a list of additional URIs for the primary purpose has been to include a list of additional URIs for the
resource, including names and mirror locations. However, it has become resource, including names and mirror locations. However, it has become
clear that the combination of many different functions within this clear that the combination of many different functions within this
single field has been a barrier to consistently and correctly single field has been a barrier to consistently and correctly
implementing any of those functions. Furthermore, we believe that the implementing any of those functions. Furthermore, we believe that the
identification of names and mirror locations would be better performed identification of names and mirror locations would be better performed
via the Link header field. The URI header field is therefore deprecated via the Link header field. The URI header field is therefore deprecated
in favor of those other fields. in favor of those other fields.
URI-header = "URI" ":" 1#( "<" URI ">" ) URI-header = "URI" ":" 1#( "<" URI ">" )
19.7 Compatibility with Previous Versions 19.7 Compatibility with Previous Versions
It is beyond the scope of a protocol specification to mandate compliance It is beyond the scope of a protocol specification to mandate compliance
with previous versions. HTTP/1.1 was deliberately designed, however, to with previous versions. HTTP/1.1 was deliberately designed, however, to
make supporting previous versions easy. It is worth noting that at the make supporting previous versions easy. It is worth noting that at the
time of composing this specification, we would expect commercial time of composing this specification, we would expect commercial
HTTP/1.1 servers to: HTTP/1.1 servers to:
. recognize the format of the Request-Line for HTTP/0.9, 1.0, and 1.1 o recognize the format of the Request-Line for HTTP/0.9, 1.0, and 1.1
requests; requests;
. understand any valid request in the format of HTTP/0.9, 1.0, or o understand any valid request in the format of HTTP/0.9, 1.0, or
1.1; 1.1;
. respond appropriately with a message in the same major version used o respond appropriately with a message in the same major version used
by the client. by the client.
And we would expect HTTP/1.1 clients to: And we would expect HTTP/1.1 clients to:
. recognize the format of the Status-Line for HTTP/1.0 and 1.1 o recognize the format of the Status-Line for HTTP/1.0 and 1.1
responses; responses;
. understand any valid response in the format of HTTP/0.9, 1.0, or o understand any valid response in the format of HTTP/0.9, 1.0, or
1.1. 1.1.
For most implementations of HTTP/1.0, each connection is established by For most implementations of HTTP/1.0, each connection is established by
the client prior to the request and closed by the server after sending the client prior to the request and closed by the server after sending
the response. A few implementations implement the Keep-Alive version of the response. A few implementations implement the Keep-Alive version of
persistent connections described in section 19.7.1.1. persistent connections described in section 19.7.1.1.
19.7.1 Compatibility with HTTP/1.0 Persistent Connections 19.7.1 Compatibility with HTTP/1.0 Persistent Connections
Some clients and servers may wish to be compatible with some previous Some clients and servers may wish to be compatible with some previous
implementations of persistent connections in HTTP/1.0 clients and implementations of persistent connections in HTTP/1.0 clients and
servers. Persistent connections in HTTP/1.0 must be explicitly servers. Persistent connections in HTTP/1.0 must be explicitly
skipping to change at line 7255 skipping to change at page 153, line 30
and appendix 19.2 defines multipart/byteranges. and appendix 19.2 defines multipart/byteranges.
19.8.4 Possible Merge With Digest Authentication Draft 19.8.4 Possible Merge With Digest Authentication Draft
Note that the working group draft for Digest Authentication may be Note that the working group draft for Digest Authentication may be
processed by the IESG at the same time as this document; we leave it to processed by the IESG at the same time as this document; we leave it to
the RFC editor to decide whether to issue a single RFC containing both the RFC editor to decide whether to issue a single RFC containing both
drafts (see section 11.2 for where it would be put); in any case, the drafts (see section 11.2 for where it would be put); in any case, the
reference in the reference list will need to be either deleted, or made reference in the reference list will need to be either deleted, or made
to the appropriate RFC (and section 11.2 deleted). to the appropriate RFC (and section 11.2 deleted).
19.8.5 Media type parameters named "q"
Due to historical HTTP usage (i.e. a mistake in HTTP's BNF), IANA should
discourage registering any media type that uses a parameter named "q".
See section 14.1 for more information.
 End of changes. 227 change blocks. 
413 lines changed or deleted 563 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/