2 HTTP Ie
2 HTTP Ie
Internet Engineering
Spring 2022
Mehdi Aminian
transport-layer service
models
client-server paradigm
peer-to-peer
paradigm
Some network apps
5
peer-to-peer (P2P)
Client-server architecture
8
server:
always-on host
permanent IP address
data centers for scaling
clients:
communicate with server
client/server
may be intermittently connected
may have dynamic IP addresses
do not communicate directly with
each other
P2P architecture
9
peer-peer
no always-on server
arbitrary end systems directly
communicate
peers request service from
other peers, provide service in
return to other peers
self scalability – new
peers bring new service
capacity, as well as new
service demands
peers are intermittently
connected and change IP
addresses
complex management
Processes communicating
10
transport transport
network network controlled
link by OS
link Internet
physical physical
Addressing processes
12
end-point authentication
19 Outlines
First, a review…
web page consists of objects
object can be HTML file, JPEG image, Java
applet, audio file,…
web page consists of base HTML-file which
includes several referenced objects
each object is addressable by a URL, e.g.,
www.someschool.edu/someDept/pic.gif
<protocol(scheme)>://<user>:<pass>@<host>:<port>/<path>?<
query>#<frag> (rfc1738)
First part - protocol
terminated by colon ( : )
common protocols are http, ftp, mailto, telnet,
i.e.: http: ftp: mailto: telnet:
Second part - varies according to protocol
mailto - e-mail address e.g.:
◼ mailto: [email protected]
resource-oriented protocols (http, ftp etc)
◼ Host name + domain names (preceded by //)
◼ may optionally include username, password and port
◼ Pathname (usually related to the path of a file on the server)
◼ i.e. //fully-qualified-domain-name/path-to-document
Optional third parts
Query string (preceded by ?)
Fragment identifier (preceded by #)
Example URLs
mailto:[email protected]
http://www.aut.ac.ir:80/
ftp://me:[email protected]/pub
http://www.bing.com/search?q=web&go=&qs=n&form=QBLH
&pq=web&sc=0-0&sp=-1
file://c:/windows/ file:///home/mehdi/work
URL (cont’d)
23
http://www.example.com/submit.php?name=mehdi&family=ahmadi
URL (cont’d)
24
Handled by browser
Browser gets whole resource (doc) from sever
In display time, it jumps to the specified part
HTTP overview
25
client/server model
client:browser that
requests, receives, server
(using HTTP protocol) running
and “displays” Web Apache Web
server
objects
server: Web server iphone running
sends (using HTTP Safari browser
protocol) objects in
response to requests
HTTP overview (continued)
26
time
6. Steps 1-5 repeated for each of
10 jpeg objects
Non-persistent HTTP: response time
30
~
~ entity body ~
~ body
Uploading form input
34
POST method:
web page often includes
form input
input is uploaded to server
in entity body
URL method:
uses GET method
input is uploaded in URL
field of request line:
www.somesite.com/animalsearch?monkeys&banana
Method types
35
HTTP/1.0: HTTP/1.1:
GET GET, POST, HEAD
POST PUT
HEAD uploads file in entity
asksserver to leave body to path
requested object out specified in URL field
of response DELETE
deletes file specified
in the URL field
HTTP response message
36
status line
(protocol
HTTP/1.1 200 OK\r\n
status code Date: Sun, 26 Sep 2010 20:09:20 GMT\r\n
status phrase) Server: Apache/2.0.52 (CentOS)\r\n
Last-Modified: Tue, 30 Oct 2007 17:00:02
GMT\r\n
header ETag: "17dc6-a5c-bf716880"\r\n
Accept-Ranges: bytes\r\n
lines Content-Length: 2652\r\n
Keep-Alive: timeout=10, max=100\r\n
Connection: Keep-Alive\r\n
Content-Type: text/html; charset=ISO-8859-
1\r\n
\r\n
data, e.g., data data data data data ...
requested
HTML file
HTTP response status codes
37
client server
ebay 8734
usual http request msg Amazon server
cookie file creates ID
usual http response
1678 for user create backend
ebay 8734
set-cookie: 1678 entry database
amazon 1678
usual http request msg
cookie: 1678 cookie- access
specific
usual http response msg action
Authentication
Client side: Authenticate clients before they access web
Server side: Authenticate clients before they access the server
assumptions:
❑ avg object size: 100K bits origin
❑ avg request rate from browsers to servers
public
origin servers:15/sec Internet
❑ avg data rate to browsers: 1.50 Mbps
❑ RTT from institutional router to any
origin server: 2 sec
❑ access link rate: 1.54 Mbps 1.54 Mbps
access link
consequences: problem! institutional
❑ LAN utilization: 15% network
1 Gbps LAN
❑ access link utilization = 99%
❑ total delay = Internet delay + access
delay + LAN delay
= 2 sec + minutes + usecs
Caching example: fatter access link
assumptions:
❑ avg object size: 100K bits origin
❑ avg request rate from browsers to servers
origin servers:15/sec public
❑ avg data rate to browsers: 1.50 Mbps Internet
❑ RTT from institutional router to any
origin server: 2 sec
❑ access link rate: 1.54 Mbps
154 Mbps 1.54 Mbps
154 Mbps
consequences: access link
53
Cost: increased access link speed (not cheap!)
Caching example: install local cache
assumptions:
❑ avg object size: 100K bits origin
❑ avg request rate from browsers to servers
origin servers:15/sec public
❑ avg data rate to browsers: 1.50 Mbps Internet
❑ RTT from institutional router to any
origin server: 2 sec
❑ access link rate: 1.54 Mbps 1.54 Mbps
consequences: access link
Client
Web Server
Server responds with a 401 (not
authorized and a challenge request
for the client to authenticate
Client Response
Well established clients like Firefox, Internet Explorer …. will respond to the
challenge request (WWW-Authenticate) by presenting the user with a small pop-
up window with data entry fields for
userid
password
a Submit button and a Cancel button
entering a valid userid and password will post the data to the server, the server
will attempt authentication and if authenticated will serve the originally requested
resource.
HTTP Authentication
59
HTTP Security
60