php-faq.com logo August 20, 2008, 4:13 am 

 
  This is the unoffical php FAQ. The official php FAQ can be found at http://www.php.net/faq
  faq    Books    McCormick Spices    Links    Suggest    About    Old Bay Seasoning    Privacy    Terms   

7 HTTP Entity - RFC2616 (HTTP/1.1. Draft June 1999)

RFC2616 HTTP/1.1 Draft (1999)
Chapter 1 - Introduction
Chapter 2 - Notational Conventions
Chapter 3 - Protocol Parameters
Chapter 4 - HTTP Messages
Chapter 5 - HTTP Request
Chapter 6 - Response
Chapter 7 - Entity
Chapter 8 - Connections
Chapter 9 - Methods
Chapter 10 - Status Code Definitions
Chapter 11 - Access Authentication
Chapter 12 - Content Negotiation
Chapter 13 - Caching in HTTP
Chapter 14 - Header Field Definitions
Chapter 15 - Security Considerations
Chapter 16 - Acknowledgements
Chapter 17 - References
Chapter 18 - Authors Addresses
Chapter 19 - Appendices
7 Entity 7.2.2 Entity Length
7.1 Entity Header Fields 7.2.1 Type
7.2 Entity Body  

7.1 Entity Header Fields Top
Entity-header fields define metainformation about the entity-body or, if no body is present, about the resource identified by the request. Some of this metainformation is OPTIONAL; some might be REQUIRED by portions of this specification.

         entity-header  = Allow                    ; Section 14.7
                        | Content-Encoding         ; Section 14.11
                        | Content-Language         ; Section 14.12
                        | Content-Length           ; Section 14.13
                        | Content-Location         ; Section 14.14
                        | Content-MD5              ; Section 14.15
                        | Content-Range            ; Section 14.16
                        | Content-Type             ; Section 14.17
                        | Expires                  ; Section 14.21
                        | Last-Modified            ; Section 14.29
                        | extension-header
  
         extension-header = message-header

The extension-header mechanism allows additional entity-header fields to be defined without changing the protocol, but these fields cannot be assumed to be recognizable by the recipient. Unrecognized header hields SHOULD be ignored by the recipient and MUST be forwarded by transparent proxies.

7.2 Entity Body Top
The entity-body (if any) sent with an HTTP request or response is in a format and encoding defined by the entity-header fields.

         entity-body    = *OCTET

An entity-body is only present in a message when a message-body is present, as described in section 4.3. The entity-body is obtained from the message-body by decoding any Transfer-Encoding that might have been applied to ensure safe and proper transfer of the message.

7.2.1 Type Top
When an entity-body is included with a message, the data type of that body is determined via the header fields Content-Type and Content- Encoding. These define a two-layer, ordered encoding model:

         entity-body := Content-Encoding( Content-Type( data ) )

Content-Type specifies the media type of the underlying data. Content-Encoding may be used to indicate any additional content codings applied to the data, usually for the purpose of data compression, that are a property of the requested resource. There is no default encoding.

Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type header field defining the media type of that body. If and only if the media type is not given by a Content-Type field, the recipient MAY attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI used to identify the resource. If the media type remains unknown, the recipient SHOULD treat it as type "application/octet-stream".

7.2.2 Entity Length Top
The entity-length of a message is the length of the message-body before any transfer-codings have been applied. Section 4.4 defines how the transfer-length of a message-body is determined.


Formatted into html by www.php-faq.com

Copyright © The Internet Society (1999). All Rights Reserved.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.



Loans | Remortgages | Nelly Furtado | iKobo | Wikipedia