Web Programming Course
SUT • Fall 2019
Course Information
History of the Internet
The HTTP Protocol
HTTP Requests
HTTP Responses
Summary
Final Exam | 3 points |
Midterm Exam | 3 points |
Quizzes/Take Homes | 2 points |
Home work | 4 points |
Project | 8 points |
"Do you see the L?“
"Yes, we see the L," came the response.
We typed the O, and we asked, "Do you see the O.“
"Yes, we see the O.“
Then we typed the G, and the system crashed ...
HTTP 0.9: The One-Line Protocol (1991)
Client request is a single ASCII character string.
Client request is terminated by a carriage return (CRLF).
Server response is an ASCII character stream.
Server response is a hypertext markup language (HTML).
Connection is terminated after the document transfer is complete.
$> telnet google.com 80
Connected to 74.125.xxx.xxx
GET /about/
(hypertext response)
(connection closed)
HTTP Method | Description |
---|---|
GET | Retrieve a resource |
HEAD | Same as GET, but only retrieve HTTP header |
PUT | Put information on the server |
POST | Send information to the serve |
OPTIONS | Get information about the server |
HTTP 1.0: Rapid Growth and Informational RFC (1996)
Request may consist of multiple newline separated header fields.
Response object is prefixed with a response status line.
Response object has its own set of newline separated header fields.
Response object is not limited to hypertext.
The connection between server and client is closed after every request.
$> telnet website.org 80
Connected to xxx.xxx.xxx.xxx
GET /rfc/rfc1945.txt HTTP/1.0
User-Agent: CERN-LineMode/2.15 libwww/2.17b3
Accept: */*
HTTP/1.0 200 OK
Content-Type: text/plain
Content-Length: 137582
Expires: Thu, 01 Dec 1997 16:00:00 GMT
Last-Modified: Wed, 1 May 1996 12:45:26 GMT
Server: Apache 0.84
(plain-text response)
(connection closed)
Status code | Description |
---|---|
1XX | Informational |
2XX | Successful |
3XX | Redirection |
4XX | Client Error |
5XX | Server Error |
HTTP/1.1: Internet Standard (1997)
$> telnet website.org 80
Connected to xxx.xxx.xxx.xxx
GET /index.html HTTP/1.1
Host: website.org
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4)... (snip)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: __qca=P0-800083390... (snip)
HTTP/2: Improving Transport Performance (2015)