Week7 Lecture1 Chapter 2
Week7 Lecture1 Chapter 2
Week7 Lecture1 Chapter 2
Week7_Lecture1 (Chapter2)
Application Layer
~
~ entity body ~
~ body
* Check out the online interactive exercises for more examples: h ttp://gaia.cs.umass.edu/kurose_ross/interactive/
Application Layer: 2-5
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 message
301 Moved Permanently
• requested object moved, new location specified later in this message (in
Location: field)
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-6
Trying out HTTP (client side) for yourself
1. netcat to your favorite Web server:
opens TCP connection to port 80 (default HTTP server
% nc -c -v gaia.cs.umass.edu 80
port) at gaia.cs.umass. edu.
anything typed in will be sent to port 80 at
gaia.cs.umass.edu
2. type in a GET HTTP request:
GET /kurose_ross/interactive/index.php HTTP/1.1
Host: gaia.cs.umass.edu by typing this in (hit carriage return twice), you send
this minimal (but complete) GET request to HTTP
server
lower average end-end delay than with 154 Mbps link (and cheaper too!)
Application Layer: 2-17
Conditional GET
client server
in HTTP request
If-modified-since: <date>
server: response contains no HTTP request msg
If-modified-since: <date> object
object if cached copy is up-to-date: modified
HTTP/1.0 304 Not Modified HTTP response after
HTTP/1.0 200 OK <date>
<data>
O1
O2
O1
O2 O3
O3
O4
O4
objects delivered in order requested: O2, O3, O4 wait behind O1 Application Layer: 2-21
HTTP/2: mitigating HOL blocking
HTTP/2: objects divided into frames, frame transmission interleaved
server
O2
O3
O1 O4
All material copyright 1996-2020 J.F Kurose and K.W. Ross, All Rights Reserved
These slides are freely provided by the book authors and it represents a lot of work on their part. We would like to thank J.F Kurose and K.W. Ross.
32