protocols:http
This is an old revision of the document!
HTTP
Intro
HTTP can run in two modes:
- Non-Persistent - each response/request is sent over separate TCP connection
- Persistent - re-using same TCP connection for all request/responses
There are two HTTP message types:
- Request
- Response
Both have a start line, headers, an empty line and optional body.
HTTP Request Message
First line in the Request Message is called a request line. The subsequent lines are called headers line.
Request line has three fields:
- Method
- URL
- HTTP version
HTTP Response Message
First line in Response Message is called a status line. Then we have six header lines and then entity body.
Status line has three fields:
- Protocol version
- Status code
- Corresponding status message
Cookie
HTTP is a Stateless protocol. Cookie is the primary mechanism for maintaining state. Cookies allows a web server to know:
- Whether you've visited before
- Whether you're logged in
- What's in your shopping cart
- What language you selected
protocols/http.1782741078.txt.gz · Last modified: by v1ctor
