HTTP Overview and Message Formats Flashcards
rules that define his entities in a network communicate with each other
Network protocols
a network protocol that runs on top of TCP and IP.
governs communication over the web
HTTP
request and sent using HTTP
HTML pages
Style sheets
Scripts
Images
Fonts
designed HTTP in 1990
Tim Berners-Lee and Robert Cailliau
Latest Version of HTTP
HTTP/2.0
Most Used version of HTTP
HTTP/1.1
characteristics of HTTP
client-server
request-response
stateless
requests are sent to a server by another server or client programs called user-agents
Client-Server
programs that make HTTP requests for humans users
User-agents
most common user-agent
web browser
HTTP communication is done through exchanges of request and response messages
Request-Response
where request messages are sent
sends back a response
web server
the client and server are only aware of each other during the current request-response exchange
Stateless
TRUE OR FALSE
client and server may have multiple HTTP transactions in succession but each request doesn’t depend on the context of the previous one
TRUE
ratio of exchange of request and repsonse in an HTTP transaction
1:1
TRUE OR FALSE
TCP connection may or may not be closed
TRUE
TRUE OR FALSE
To fulfill a request, a server may have to sent requests to other servers
TRUE
web servers that act as intermediaries between client and server
Proxies
2 types of proxies
Forward Proxy
Reverse Proxy
used to pass messages from one part of the internet to another
Forward Proxies
used as an entrance to private networks
Reverse Proxies
does not modify passing requests
Transparent proxy
modifies passing requests
Non-transparent proxy
Proxy functions
Caching
Filtering
Load Balancing
Authentication
Logging
cache data that may be commonly requested by clients
Caching
request can be filtered to block or prioritize certain requests
Filtering
a single front-facing server accepts all requests and distributes them across different servers based on factors such as server load, proximity to client, etc.
Load Balancing
only pass request messages if they contain appropriate authentication details
Authentication
there’s proxies maintain a log of the messages that it passes along
Logging
Web entities
Web Servers
User- Agent
Proxies
have to act as both server and client
proxy
HTTP Messages 2 types
Request
Response
what HTTP message is this
GET / HTTP/1.1 Host: developer.mozilla.org Accept-Language: en
Request Message
Parts of a request message
Request Line
Headers
Body (optional)
Request Line parts
Method
Path
Protocol Version
defines the operation that the client wants to perform
Method
Methods
GET
POST
HEAD
OPTIONS
PUT
PATCH
DELETE
TRACE
CONNECT
client wants to fetch resource
GET
client wants to send data
POST
path of the resource
Path
version of HTTP to be used in the transaction
Protocol Version
convey additional information about the sender or the message payload
Headers
actual payload of the message
this is optional
Body
what HTTP message is this
HTTP/1.1 200 OK Date: Wed, 16 Aug 2017 14:28:00 GMT Server: Apache Content-Length: 25679 Content-Type: text/html
Response
Parts of a response message
Status line
Headers
Body
Parts of a status line
Protocol Version
Status Code
Reason Phrase / Status Message
a number that indicates is the request was successful or not
Status code
short English description of the status code
also called status message
Reason Phrase