Hypertext Transfer Protocol -- HTTP/1.1
Total Page:16
File Type:pdf, Size:1020Kb
Network Working Group R. Fielding Request for Comments: 2616 UC Irvine Obsoletes: 2068 J. Gettys Category: Standards Track Compaq/W3C J. C. Mogul Compaq H. Frystyk W3C/MIT L. Masinter Xerox P. Leach Microsoft T. Berners-Lee W3C/MIT June, 1999 Hypertext Transfer Protocol -- HTTP/1.1 Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the “Internet Official Protocol Standards” (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. Copyright Notice Copyright (C) The Internet Society (1999). All Rights Reserved. Abstract The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. It is a generic, stateless, protocol which can be used for many tasks beyond its use for hypertext, such as name servers and distributed object management systems, through extension of its request methods, error codes and headers [47]. A feature of HTTP is the typing and negotiation of data representation, allowing systems to be built independently of the data being transferred. HTTP has been in use by the World-Wide Web global information initiative since 1990. This specification defines the protocol referred to as “HTTP/1.1”, and is an update to RFC 2068 [33]. Fielding, et al Standards Track [Page 1] RFC 2616 HTTP/1.1 June, 1999 Table of Contents HYPERTEXT TRANSFER PROTOCOL -- HTTP/1.1.................................................1 Status of this Memo .......................................................................................................................................1 Copyright Notice............................................................................................................................................1 Abstract ..........................................................................................................................................................1 Table of Contents...........................................................................................................................................2 1 Introduction .......................................................................................................................................7 1.1 Purpose ........................................................................................................................................7 1.2 Requirements ...............................................................................................................................7 1.3 Terminology ................................................................................................................................8 1.4 Overall Operation ......................................................................................................................10 2 Notational Conventions and Generic Grammar ...........................................................................11 2.1 Augmented BNF........................................................................................................................11 2.2 Basic Rules ................................................................................................................................12 3 Protocol Parameters ........................................................................................................................13 3.1 HTTP Version ...........................................................................................................................13 3.2 Uniform Resource Identifiers.....................................................................................................14 3.2.1 General Syntax...................................................................................................................14 3.2.2 http URL ............................................................................................................................14 3.2.3 URI Comparison................................................................................................................15 3.3 Date/Time Formats ....................................................................................................................15 3.3.1 Full Date ............................................................................................................................15 3.3.2 Delta Seconds ....................................................................................................................16 3.4 Character Sets ............................................................................................................................16 3.4.1 Missing Charset .................................................................................................................16 3.5 Content Codings ........................................................................................................................16 3.6 Transfer Codings .......................................................................................................................17 3.6.1 Chunked Transfer Coding..................................................................................................18 3.7 Media Types ..............................................................................................................................18 3.7.1 Canonicalization and Text Defaults...................................................................................19 3.7.2 Multipart Types..................................................................................................................19 3.8 Product Tokens..........................................................................................................................20 3.9 Quality Values ...........................................................................................................................20 3.10 Language Tags...........................................................................................................................20 3.11 Entity Tags.................................................................................................................................20 3.12 Range Units ...............................................................................................................................21 4 HTTP Message.................................................................................................................................21 4.1 Message Types...........................................................................................................................21 4.2 Message Headers .......................................................................................................................21 4.3 Message Body............................................................................................................................22 4.4 Message Length .........................................................................................................................23 4.5 General Header Fields ...............................................................................................................23 Fielding, et al Standards Track [Page 2] RFC 2616 HTTP/1.1 June, 1999 5 Request .............................................................................................................................................24 5.1 Request-Line..............................................................................................................................24 5.1.1 Method...............................................................................................................................24 5.1.2 Request-URI ......................................................................................................................24 5.2 The Resource Identified by a Request .......................................................................................25 5.3 Request Header Fields ...............................................................................................................26 6 Response ...........................................................................................................................................26 6.1 Status-Line.................................................................................................................................26 6.1.1 Status Code and Reason Phrase .........................................................................................26 6.2 Response Header Fields.............................................................................................................28 7 Entity ................................................................................................................................................28 7.1 Entity Header Fields ..................................................................................................................28 7.2 Entity Body................................................................................................................................29 7.2.1 Type...................................................................................................................................29 7.2.2 Entity Length .....................................................................................................................29 8 Connections ......................................................................................................................................29