HTTP (overview and message formats) Flashcards
Network protocols are _______ that define how entities in a network communicate with each other.
Rules
Network protocols cover how to? (3 items)
- Identify and establish communication with the other party.
- Transmit and receive data.
- Message formats
HTTP is a _______ _________ that runs on top of TCP and IP. It governs communication over the Web.
network protocol.
HTTP is used to request and send resources such as: (5)
- HTML Pages
- Style sheets
- Scripts
- Images
- Fonts
Who designed HTTP?
Tim Berners-Lee and Robert Cailliau
Latest Version of HTTP?
HTTP/2.0 (finalized in 2015)
Most used version of HTTP
HTTP/1.1 (finalized in 1997)
Characteristics of HTTP
- Client Server
- Request Response
- Stateless
Requests are either sent to a server either by:
- another server
- or client programs called user-agents
Programs that make HHTP requests for human users.
User-Agents
Beside web browsers, user agents can also be:
- Mobile apps
- Desktop apps
- Machine-automated user-agents (robots/crawlers)
The most common user-agent
Web-browser
Request messages are sent to a ___________ which handles it, then sends back a response.
Web server.
HTTP communication is done through exchanges of ___________ and ________________.
request and response messages.
It’s usually not a direct connection between user-agent and web server. Sometimes, there are ___________ acting between the client and the server.
Proxy
Characteristic of HTTP that makes the client and server are only aware of each other during the current request-response exchange.
Stateless
An HTTP transaction is the ____________ of request and response.
1:1 exchange
- Browser extracts server’s ___________ from the url.
hostname
- Browser resolves the ___________ via Domain Name Resolution.
IP address.
- Browser extracts the __________ from the URL.
port
- Browser establishes a _______________ with the server.
TCP connection
- Browser sends an ___________________ to the server.
HTTP Request
- Browser receives a _________ from the server.
response
- TCP connection may or may not be ________ (depends on HTTP version).
closed
What does the browser do with the response from the server?
The browser parses the returned HTML doc, fetching additional resources as needed.
A server may have to send requests to ______________ in order to fulfill a request sent to it.
Other servers
Web servers that act as intermediaries between client and server.
Proxies
Two main types of Proxy
Forward Proxy and Reverse Proxy
Proxies used to pass messages from one part of the Internet to another.
Forward Proxies
Proxies used as an entrance to private networks.
Reverse Proxy
Proxies usually placed at the ‘edge’ of a local network to direct internal traffic to the public internet.
Forward Proxies
Normally used for regulation of access from the public internet to a private network.
Reverse Proxy
Proxy can also be described as: (2)
Transparent and Non Transparent.
Proxies that does not modify passing requests.
Transparent
Proxies that modifies passing requests.
Non-transparent
Proxies perform functions such as: (5)
Caching, filtering, load balancing, authentication, logging.
Reduces load on the actual server
Caching
__________ cache data that maybe commonly requested by clients.
Caching servers.
Request can be filtered to block or prioritize certain requests.
Filtering
A single font-facing server accepts all requests and distributes them across different servers based on factors such as server load, proximity to client, etc.
Load Balancing
Proxies that only pass messages if they contain appropriate authentication details.
Authentication Proxies.
These proxies maintain a log of the messages that it passes along.
Logging
Proxies usually have to act as both _________ and _________.
server and client
A proxy is also a ______ when it makes a request on behalf of a browser/user-agent.
Client
A web server is also a ______ when it requests data from another web server.
Client
2 types of HTTP Messages.
Request or 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
HTTP method that is used if a client wants to fetch a resource.
GET
HTTP method is used if a client wants to send data.
POST
Indicates the version of the HTTP to be used for the transaction.
Protocol Version
Part of HTTP message that convey additional information about the sender or the message payload.
Headers
Part of HTTP message that is the actual payload of the message.
Body
Messages may or may not be required to have a body based on the _________ used.
method
Parts of a response message: (3)
- Status Line (protocol version, status code, Reason Phrase)
- Headers
- Body
A number that indicates if the request was successful or not, and why.
Status code
There is a list of valid status codes defined by the W3C.
Status code
A short English description of the status code. Also called status message.
Reason Phrase