HTTP is a application layer protocol based on TCP/IP.

HTTP/0.9 (1991)

Request
1
GET /index.html
Response
1
2
3
<html>
<body>Hello World</body>
</html>
  • limitation
    • GET command only.
    • Reponse string is limited to HTML only.

HTTP/1.0 (1996/5)

  • text, hypertex, media, binary
  • GET, POST, HEAD
  • HTTP header, status code, multi-part, authorization, cache, content enconding
  • response string contains: http header + ā€œ\r\nā€ + data (html string)
  • header is limited to ASCII format only, but data segment can be any type.
Request
1
2
3
GET / HTTP/1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5)
Accept: */*
Response
1
2
3
4
5
6
7
8
9
10
HTTP/1.0 200 OK
Content-Type: text/plain
Content-Length: 137582
Expires: Thu, 05 Dec 1997 16:00:00 GMT
Last-Modified: Wed, 5 August 1996 15:55:28 GMT
Server: Apache 0.84
<html>
<body>Hello World</body>
</html>

Reference