RFC 1945

RFC 1945 is the Request for Comments: 1945.
This is a document, which defines exactly what is http, and how should it look like, etc.

Request-line

Request-Line = Method SP Request-URI SP HTTP-Version CRLF

example:

1
GET /greet HTTP/1.0

Status-line

Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF

example:

1
HTTP/1.0 100 OK

Methods

Get

URLs and Encoding

image.png

URL Encoding

image.png

image.png

State

RFC said that the HTTP protocal is a stateless protocal, but sometimes we connected to a server and logged in. And then we want the request after that login request to know that we are the one who have logged in as some identity. But the protocal itself is stateless, so we need a thing called HTTP Cookies.

With the cookies in the HTTP header, the web server could know the status of the client.