HTTP Flashcards
Network protocols are —- that define how entities in a network communicate with each other.
rules
Rules in network protocol covers?
- Identifying and establishing communication with other party
- Transmit and Receive data
- Message Formats
This is a network protocol that runs on top of TCP and IP. It governs communication over the web. It is used by the browsers, web server, and other entities on the web
HTTP
Who are the individuals behind the design of HTTP?
Tim Berners-Lee and Robert Cailliau
When was HTTP designed?
1990
There are request sent to a server either by (1)
- another server; or
- client programs called (2)?
Client Server (1)
User Agents (2)
This agents are programs that make HTTP request for human users
User-agents
What is the most common user-agent? But they can also be mobile apps, desktop apps, and machine automated user agents.
web browser
In here, HTTP communication is done through request and response messages
request-response
Where are request message sent, which handles it, then sends back a response?
web server
Is request-response an all time direct connection between user-agent and web server?
No, because sometime proxy exist in the middle.
In here, client and server are only aware of each other during the current request-response exchange.
Stateless
When client and server have multiple https transaction, are each request independent of that on the context of a previous request?
Yes
This transaction is the 1:1 exchange of request and response
HTTP transaction
What is the first step in a HTTP transaction?
- Browsers extracts server’s hostname
What is the second step in HTTP transaction?
- Browser resolves the IP address via Domain name Resolutiom
What is the third step in a HTTP transaction?
- Browser extracts the port from the URL
What is the fourth step in a http transaction?
- Browser establishes a TCP connection with the web server.
After a browser establishes a tcp connection with the web server what is next?
The browser send an HTTP request to the server
After sending a request to the server, what does the server do?
The browser receives a response from the server
After receiving a response, is TCP connection closed?
It depends on the http version
What does the browser do with the response from the server?
The browser parses the returned HTML doc, fetching additional resources as needed
These are web servers that act as intermediaries between client and server
Proxies
This type of proxy is used to pass messages from one part of the Internet to another. It is usually placed at the ‘edge’ of a local network to direct internal traffic to the public internet.
Forward Proxy
This type of proxy are use as an entrance to private networks. It is normally used for regulation of access from the public Internet to a private network.
Reverse Proxy
When we say that a a proxy is transparent, what do we mean?
It does not modify passing request
When we say that a a proxy is non-transparent, what do we mean?
it modifies passing request
A function of proxy is for caching servers to cache data that may be commonly requested by clients. This function reduces load on the actual server. What function is this?
Caching
A function of a proxy is for request to be filtered to block or prioritize certain requests.
Filtering
A function of a proxy is for a single front-facing server to accept all requests and distribute them across different servers based on factors such as server load, proximity to client, etc. What is this function?
Load Balancing
A function of proxy is to only pass request messages if they contain appropriate authentication details. It may just send an error response right there. The request never reaches the server. What is this?
Authentication (Auth Proxies)
A function of proxy is maintain a log of the messages that it passes along, what is this?
Logging
True or false, proxies usually have to act as both server and client.
True
When is a proxy considered a client?
When it makes a request on behalf of a browser/user-agent.
When is a web server considered a client?
when it requests data from another web server
HTTPS Messages are one of 2 types?
Request or Response.
Parts of a request message:
(1). ——–
(2)
(3)
(4)
(5)
(6) optional
- Request Line
- Method
- Path
- Protocol Version
- Headers
- Body
This defines the operation that the client wants to perform
Method
This method is used if a clients wants to fetch a resource
GET
This method is used if a client wants to send data.
POST Method
This is way from the URL. Going to the resources.
Path
This indicates the version of HTTP to be used for transaction
Protocol Version
This part of the request message convey additional information about the sender or the message payload.
Headers
This part of the request massage is the actual payload of the message. This is optional. Messages may or may not be required to have a body based on the method used.
Body
Parts of a response message:
(1)
(2)
(3)
(4)
(5)
(6)
(1) Status Line
(2) Protocol Version
(3) Status Code
(4) Reason Phrase / Status Message
(5) Headers
(6) Body
This is a number that indicates if the request was successful or not, and why
Status Code
In status code, what does 100 - 199 mean?
Informational
In status code, what does 200 - 299 mean?
Successful
In status code, what does 300 - 399 mean?
Redirection
In status code, what does 400 - 499 mean?
Client Error
In status code, what does 500 - 599 mean?
Server Error
This is a short english description of the status code. It is also called as the Status Message
Reason Phrase