04 - HTTP Overview and Message Formats Flashcards
rules that define how entities in a network communicate with each other
network protocols
network protocols cover how to: (3)
- identify and establish communication
- transmit and receive data
- message formats
network protocol that runs on top of TCP and IP
governs communication over the Web
HTTP
HTTP was designed by ____ & ___ in ___
Tim Berners-Lee
Robert Cailliau
1990
latest version of HTTP
HTTP/2.0 finalized in 2015
most used version of HTTP
HTTP/1.1 finalized in 1997
characteristics of http (3)
client-server
request-response
stateless
requests are sent to a server either by another server or client programs called user-agents
client-server
programs that make http requests for human users
user-agents
most common user agent
browsers
http communication is done through exchanges of request and response messages
request-response
request messages are sent to a ___ which handles it then sends back a response
web server
client and server are only aware of each other during the current request-response exchange
stateless
1:1 exchange of request and response
HTTP transaction
how does a http transaction work (7)
browser:
- extracts server’s hostname from the url
- resolves the ip address via dnr
- extracts the port from the url
- establishes a tcp connection with the web server
- sends an http request to the server
- receives a response from the server
- tcp connection may/may not be closed
what does the browser do with the response from the server (4)
- browser parses the returned HTML doc
- fetches additional resources as needed (images, yt vids)
- server may have to send requests to other servers
- additional requests are transparent
web servers that act as intermediaries between client and server
proxies
used to pass messages from one part of the internet to another
forward proxy
used as an entrance to private networks
usually used for regulation of access
reverse proxy
proxies can be described as: (2)
transparent: doesn’t modify passing reqs
non-transparent: modifies passing reqs
proxy functions (5)
caching
filtering
load balancing
authentication
logging
cache data that may be commonly requested by clients
caching
requests can be filtered to block or prioritize certain requests
filtering
distributes requests to different servers based on server load, proximity to client, etc
load balancing
only pass request msgs if they contain appropriate authentication details
authentication
maintain a log of the messages it passes along
logging
proxies usually have to act as ____
both server and client
types of http messages (2)
request
response
parts of a request message (3)
request line
- method
- path
- protocol version
headers
body (optional)
defines the operation that the client wants to perform
method
used to fetch a resource
GET
used to send data
POST
path from the URL
path
indicates the version of http to be used
protocol version
convey additional information about the sender/msg
headers
actual payload of the message (optional)
body
parts of a response message (3)
status line
- protocol version
- status code
- reason phrase/status message
headers
body
number that indicates if the request was successful or not
status code
short english description of the status code
reason phrase
reason phrase is also called ___
status message
found in some response messages, depending on the method used
body