HTTP: Hyper Text Transfer Protocol
- Protocol for transfer of resources
- Resources:
- Files
- Result of :
- Database query
- Program execution
- Automatic translation of a document
- Resources:
- Specified in two incompatible versions:
- HTTPv1.0 → RFC 1945
- HTTPv1.1 → RFC 2616
- Client-Server Model
- Operates with simple “transactions”
- Request – Response
- Client requests objects → generates “requests”
- Messages in ASCII format (understandable for humans
- Server transfers objects → generates “responses”
- ASCII messages MIME type (RFC 822)
- Client requests objects → generates “requests”
- Stateless and Connectionless protocol
- Server does not store information on clients or transactions
- Simplifies Servers design High performance web servers, capable of handling many TCP connections
- Request – Response
- Uses TCP as transport layer protocol:
- Client initiates a TCP connection (creates socket) to server, port 80
- Server accepts TCP connection from client (connection socket is created in server)
- HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server)
- TCP connection closed
- HTTP response status codes
- 200 OK
- request succeeded, requested object later in this msg
- 301 Moved Permanently
- requested object moved, new location specified later in this msg (Location:)
- 400 Bad Request
- request msg not understood by server
- 404 Not Found
- requested document not found on this server
- 505 HTTP Version Not Supported
- 200 OK

Figure 11 Example of HTTP status code 404 from GitHub.com