WebEssentials Modified
WebEssentials Modified
Open-access networks
Regional university networks (e.g., SURAnet)
CSNET for CS departments not on ARPANET
NSFNET (1985-1995)
Primary purpose: connect supercomputer centers
Secondary purpose: provide backbone to connect
regional networks
Source
Network 1
Gateway
Destination
Gateway
Network 2 Network 3
Source
LAN 1
Gateway
Destination
Gateway
OK.
{
Here’s a packet.
Send packet
Source Destination
with Got it.
acknowledgment.
Here’s a packet.
{
Resend packet if
no (or delayed) Here’s a resent packet.
acknowledgment.
Got it.
{
Send GET / HTTP/1.1
Request Host: www.example.org
{
HTTP/1.1 200 OK
Receive
Date: Thu, 09 Oct 2003 20:30:49 GMT
Response
…
Start line
Example: GET / HTTP/1.1
Three space-separated parts:
HTTP request method
Request-URI (Uniform Resource Identifier)
HTTP version
Start line
Example: GET / HTTP/1.1
Three space-separated parts:
HTTP request method
Request-URI
HTTP version
We will cover 1.1, in which version part of start line
must be exactly as shown
Guy-Vincent Jourdan :: :: based on Jeffrey C. Jackson’s slides 31
HTTP Request
Start line
Example: GET / HTTP/1.1
Three space-separated parts:
HTTP request method
Request-URI
HTTP version
Start line
Example: GET / HTTP/1.1
Three space-separated parts:
HTTP request method
Request-URI
HTTP version
POST
Used when submit button is clicked on a form
Form information contained in body of request
HEAD
Requeststhat only header fields (no body) be returned in
the response
Status line
Example: HTTP/1.1 200 OK
Three space-separated parts:
HTTP version
status code
reason phrase (intended for human use)
Status code
Three-digit number
First digit is class of the status code:
1=Informational
2=Success
4=Client Error
5=Server Error
Browser Web
Server
3. Store image
Cache
Browser Web
Server
I need that
image
again…
Cache
This…
Cache
Browser Web
Server
I need that
image
again…
Get … or this
image
Cache
Cache advantages
(Much) faster than HTTP request/response
Less network traffic
Less load on server
Cache disadvantage
Cached copy of resource may be invalid
(inconsistent with remote version)
Primary tasks:
Convert web addresses (URL’s) to HTTP
requests
Communicate with web servers via HTTP
Render (appropriately display) documents
returned by a server
authority Request-URI
Additional functionality:
Execution of scripts (e.g., drop-down menus)
Event handling (e.g., mouse clicks)
GUI for controls (e.g., buttons)
Secure communication with servers
Display of non-HTML documents (e.g., PDF)
via plug-ins
Basic functionality:
Receive HTTP request via TCP
Map Host header to specific virtual host (one of many host
names sharing an IP address)
Map Request-URI to specific resource associated with the
virtual host
File: Return file in HTTP response
Program: Run program and return output in HTTP response
Access control:
Password protection (e.g., admin pages)
Users
and roles defined in
conf/tomcat-users.xml
Deny access to machines
Useful for denying access to certain users by denying access
from the machines they use
List of denied machines maintained in RemoteHostValve
Real
Browser www.example.org
Real
Browser www.example.org