Apr 17, 2008

HTTP Reference Introduction

HTTP Reference Introduction

HTTP characteristics:

  • Stateless - Each transaction between the client and server is independent and no state is set based on a previous transaction or condition.
  • Uses requests from the client to the server and responses from the server to the client for sending and receiving data.

HTTP 1.1 is defined by RFC 2616. This document only highlights some main points of the HTTP 1.1 definitions and for detailed information, the reader should read RFC 2616.

From RFC 2616:
" HTTP messages consist of requests from client to server and responses from server to client.

HTTP-message = Request | Response ; HTTP/1.1 messages

Request (section 5) and Response (section 6) messages use the generic message format of RFC 822 [9] for transferring entities (the payload of the message). Both types of message consist of a start-line, zero or more header fields (also known as "headers"), an empty line (i.e., a line with nothing preceding the CRLF) indicating the end of the header fields, and possibly a message-body.

generic-message = start-line 
        *(message-header CRLF) 
        CRLF 
        [ message-body ] 
start-line = Request-Line | Status-Line

HTTP header fields, which include general-header (section 4.5), request-header (section 5.3), response-header (section 6.2), and entity-header (section 7.1) fields, follow the same generic format as that given in Section 3.1 of RFC 822 [9]. Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive. The field value MAY be preceded by any amount of LWS, though a single SP is preferred. Header fields can be extended over multiple lines by preceding each extra line with at least one SP or HT. "

HTTP utilizes headers at the start of each message.

Common Gateway Interface (CGI)

CGI is required in order for information passed from the client to the server using HTTP to be processed by a program which is running on the server. CGI is a defined standard that provides for the passing of data between a web server and a CGI application. The CGI defines a set of environment variables that are used to pass the data. A CGI application may be written in C, C++, Perl, Unix shells, TCL, JAVA, visual basic or other languages. The CGI variables may be set on the client side using client side embedded script code such as JAVA script or VB script.

No comments:

Post a Comment

Popular Posts