|
||
|
|
Appendix B HyperText Transfer Protocol
This appendix provides a short introduction to the HyperText Transfer Protocol (HTTP). For more information on HTTP, see the Internet Engineering Task Force (IETF) home page at
:
http://www.ietf.org/home.html
This appendix contains the following sections:
About HyperText Transfer Protocol (HTTP)
The HyperText Transfer Protocol (HTTP) is a protocol (a set of rules that describe how information is exchanged on a network) that allows a web browser and a web server to "talk" to each other using the ISO Latin1 alphabet, which is ASCII with extensions for European languages.
HTTP is based on a request/response model. The client connects to the server and sends a request to the server. The request contains the following: request method, URI, and protocol version. The client can then send additional header information. The server's response includes protocol version, status code, followed by a header that contains server information, additional information headers, and then the requested data. The connection is then closed.
Netscape Enterprise Server supports HTTP 1.1. Some previous versions of the server supported HTTP 1.0. The server is conditionally compliant with the HTTP 1.1 proposed standard, as approved by the Internet Engineering Steering Group (IESG) and the Internet Engineering Task Force (IETF) HTTP working group. For more information on the criteria for being conditionally compliant, see the Hypertext Transfer ProtocolHTTP/1.1 specification (RFC 2068) at:
www.ietf.org/rfc/rfc2068.txt?number=2068
A request from a client to a server includes the following information:
A client can request information using a number of methods. The commonly used methods include the following:
GETRequests the specified document![]()
HEADRequests only the header information for the document![]()
POSTRequests that the server accept some data from the client, such as form input for a CGI program![]()
PUTReplaces the contents of a server's document with data from the client![]()
The client can send header fields to the server. Most are optional. Some commonly used request headers are shown in Table B-1.
Table B-1 Common request headers
If the client has made a
POSTorPUTrequest, it can send data after the request header and a blank line. If the client sends aGETorHEADrequest, there is no data to send; the client waits for the server's response.
The server's response includes the following:
When a client makes a request, one item the server sends back is a status code, which is a three-digit numeric code. There are four categories of status codes:
- Status codes in the 100-199 range indicate a provisional response.
![]()
- Status codes in the 200-299 range indicate a successful transaction.
![]()
- Status codes in the 300-399 range are returned when the URL can't be retrieved because the requested document has moved.
![]()
- Status codes in the 400-499 range indicate an error in the request (document doesn't exist, authorization is required, and so on).
![]()
- Status codes of 500 and higher indicate that the server can't perform the request, or an error has occurred.
![]()
Table B-2 contains some common status codes.
Table B-2 Common HTTP status codes
The response header contains information about the server and information about the document that will follow. Common response headers are shown in Table B-3.
Table B-3 Common response headers
Used during authentication and includes information that tells the client software what is necessary for authentication (such as username and password).
The server sends a blank line after the last header field. The server then sends the document data.
© 2001 Sun Microsystems, Inc. Portions copyright 1999, 2002 Netscape Communications Corporation. All rights reserved.
Last Updated August 02, 2002