Chapter2 Part2
Chapter2 Part2
Application Layer
time
6. Steps 1-5 repeated for each of 10
jpeg objects
header
lines
carriage return,
line feed at start
of line indicates
end of header lines
Application Layer 2-11
HTTP request message: general format
~
~ entity body ~
~ body
www.somesite.com/animalsearch?monkeys&banana
header
lines
data, e.g.,
requested
HTML file
Application Layer 2-15
HTTP response status codes
status code appears in 1st line in server-to-client response message.
some sample codes:
200 OK
request succeeded, requested object later in this msg
301 Moved Permanently
requested object moved, new location specified later in this msg
(Location:)
400 Bad Request
request msg not understood by server
404 Not Found
requested document not found on this server
505 HTTP Version Not Supported
Application Layer 2-16
Trying out HTTP (client side) for yourself
1. Telnet to your favorite Web 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
HT proxy
TP u est
req server req
HT ues P se
client TP t H TT po n
res res origin
pon T P
se HT server
t
ues
req e
TT P o ns
p
H res
T TP
H
client origin
server