0% found this document useful (0 votes)
4 views

Week 03 - Web Protocols

Web Protocols

Uploaded by

colio
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Week 03 - Web Protocols

Web Protocols

Uploaded by

colio
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 62

Web Protocols

Dr. Michele C. Weigle


CS 312 - Internet Concepts
Old Dominion University
Much of these slides are based on materials and notes from Dr. Ralph Grove

This work is licensed under a


Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
The Web
• User agent (client) for the Web is
called a browser
– MS Edge
– Firefox
– Apple Safari
– Google Chrome
• Server for the Web is called a
Web server
– Apache (open-source)
– MS Internet Information Server (IIS)

CS 312 - Internet Concepts / Weigle 2


Web Terminology
• Web page
– Addressed by a URL
– Consists of “objects”

• Most Web pages consist of


– Base HTML page
– Embedded objects

CS 312 - Internet Concepts / Weigle 3


Web Terminology
• Web page:
– Addressed by a URL
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
– Consists of “objects”
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>CNN.com</title>
<meta http-equiv="refresh" content="1800; URL=http://www.cnn.com/?">

• Most Web pages consist of


<link rel="StyleSheet" href="http://i.cnn.net/cnn/virtual/2001/style/main.css" type="text/css">
<script language="JavaScript1.1" src="http://i.cnn.net/cnn/virtual/2000/code/main.js"
type="text/javascript"> </script>

– Base HTML page


<script language="JavaScript1.1" type="text/javascript"> </script>
<script language="JavaScript1.1" src="http://ar.atwola.com/file/adsWrapper.js"></script>
<style type="text/css"></style>
– Embedded objects
<script language="JavaScript">document.adoffset=0</script>
</head>

<body class="cnnMainBody" bgcolor="#FFFFFF">

<a name="top_of_page"></a>
...

CS 312 - Internet Concepts / Weigle 4


Outline
• Hypertext Transfer Protocol (HTTP)
• Request/Response Formats
• Security: HTTPS, TLS
• Caching
• Web Developer Tools

CS 312 - Internet Concepts / Weigle 5


Hypertext Transfer Protocol (HTTP)
● The set of rules that
govern communication
between web browsers
and web servers

● Request-response
protocol

CS 312 - Internet Concepts / Weigle 6


HTTP Overview
• HTTP uses TCP • HTTP message types
– Browser initiates TCP – HTTP request
connection to server (on – HTTP response
port 80)

• HTTP messages • HTTP is "stateless"


(application-layer protocol – Server maintains no
messages) exchanged information about past
between browser and browser requests
Web server
CS 312 - Internet Concepts / Weigle 7
Hypertext Transfer Protocol (HTTP)
• HTTP/1.0 - 1989, developed by Tim Berners-Lee (
RFC 1945)
• HTTP/1.1 - 1997, still largely in use (RFC 2616)
– updated RFCs: 7230, 7231, 7232, 7233, 7234, 7235

• HTTP/2 - 2015 (RFC 7540)

• HTTP/3 - under development (Internet Draft - QUIC)


CS 312 - Internet Concepts / Weigle 8
What's a URx?

URI (identifier) - String of characters used to identify a name or


resource on the Internet
URL (locator) - Where to find a resource
URN (name) - Name of a resource
Figure source: URI Euler Diagram (Wikipedia)
CS 312 - Internet Concepts / Weigle 9
URX Provides Cross-platform Deep Linking, Indexing and
Routing

Omnilinks, a solution that embraces all the previously mentioned deep linking options
along with an index and an API. Omnilinks are very similar to App Indexing ones, but are
targeting all major mobile OSes.

The following are samples of URX links:

<link rel="alternate" media="screen and (os: android)" href="android


app://com.sample.android/sample/page1"/>

<link rel="alternate" media="screen and (os: ios)"


href="ios-app://456788990/sample/page1"/>

<link rel="alternate" media="screen and (os: windows)" href="windows-phon

https://www.infoq.com/news/2014/10/urx-deep-links/

CS 312 - Internet Concepts / Weigle 10


URI Components
Optional server port (Default = port 80)

www.someSchool.edu:8080/someDept/pic.gif

Server hostname Object path name

• URL components
– Server hostname
– (Optional port number)
– Path name
CS 312 - Internet Concepts / Weigle 11
URI Components
foo://username:[email protected]:8042/over/there/index.dtb;type=animal?name=ferret#nose
\ / \________________/\_________/ \__/ \___/ \_/ \_________/ \_________/ \__/
| | | | | | | | |
| userinfo hostname port | | parameter query fragment
| \_______________________________/ \_____________|____|____________/
scheme | | | |
| authority |path|
| | |
| path interpretable as filename
| ___________|____________ |
/ \ / \ |
urn:example:animal:ferret:nose interpretable as extension

Other examples:
• http://example.org/absolute/path/to/resource.txt
• ftp://example.org/resource.txt
• urn:issn:1535-3613
Figure source: Uniform Resource Identifier (Wikipedia)
CS 312 - Internet Concepts / Weigle 12
Outline
• Hypertext Transfer Protocol (HTTP)
• Request/Response Formats
• Security: HTTPS, TLS
• Caching
• Web Developer Tools

CS 312 - Internet Concepts / Weigle 13


HTTP Request Format
Common Request Methods:

GET - requests a file, return


file contents in body of
response

HEAD - requests a file,


return only response header

POST - sends data in the


request body (e.g., forms)

From https://www.cs.odu.edu/~mweigle/CS455-S13/Sched?action=download&upname=2-2-HTTP.pdf
CS 312 - Internet Concepts / Weigle 14
HTTP Response Format

From https://www.cs.odu.edu/~mweigle/CS455-S13/Sched?action=download&upname=2-2-HTTP.pdf
CS 312 - Internet Concepts / Weigle 15
Example HTTP Request, Response
Requesting http://www.harding.edu/comp/
Client Request
GET /comp/ HTTP/1.1
Host: www.harding.edu

Server Response
HTTP/1.1 200 OK
Content-Length: 6018
Content-Type: text/html
Content-Location: http://www.harding.edu/comp/
Last-Modified: Mon, 05 Jul 2010 18:49:40 GMT
Server: Microsoft-IIS/6.0

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"


"http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Harding
University - Computer Science</title>
CS 312 - Internet Concepts / Weigle 16
HTTP Response Codes
not "error" codes!
● 1xx: Informational - Request received, continuing
process
● 2xx: Success - The action was successfully received,
understood, and accepted
● 3xx: Redirection - Further action must be taken in
order to
complete the request
● 4xx: Client Error - The request contains bad syntax or
cannot be fulfilled
● 5xx: Server Error - from
TheSectionserver failed
6 of RFC 7231, to fulfill an
https://tools.ietf.org/html/rfc7231#section-6
apparently valid request
CS 312 - Internet Concepts / Weigle 17
Example Response Codes
• 200 OK
– Request succeeded, requested object later in this message
• 301 Moved Permanently
– Requested object moved, new location specified later in
this message (Location:)
• 400 Bad Request
– Request message not understood by server
• 404 Not Found
– Requested document not found on this server
• 505 HTTP Version Not Supported
CS 312 - Internet Concepts / Weigle 18
Example: Web Page Request
(2) foo.org DNS
(1) Enter URL (3) 1.2.3.4
(4) HTTP GET /bar.html
http://foo.org/bar.html
(6) HTTP Response
(5) Locate the
(8) HTTP GET image1 representation
(7) Parse HTML
& display (N) HTTP GET imageX

Potentially many
requests & responses
Client (Web Browser) Web Server (foo.org) 1.2.3.4
CS 312 - Internet Concepts / Weigle 19
Building Up a Webpage

Learn more about HTTP: https://developer.mozilla.org/en-US/docs/Web/HTTP


CS 312 - Internet Concepts / Weigle 20
HTTP Redirect
Client Server
• Resource has been
HTTP request
moved to a new GET /old-URI object
moved
location HTTP response
302 Found
• Server responds with Location: new-URI

URI of new location HTTP request


GET /new-URI object
• Client must make the located
HTTP response
new request 200 OK
<data>
CS 312 - Internet Concepts / Weigle 21
What's Content-Type?
Client Request
GET /comp/ HTTP/1.1
Host: www.harding.edu

Server Response
HTTP/1.1 200 OK
Content-Length: 6018
Content-Type: text/html
Content-Location: http://www.harding.edu/comp/
Last-Modified: Mon, 05 Jul 2010 18:49:40 GMT
Server: Microsoft-IIS/6.0

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"


"http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Harding
University - Computer Science</title>
CS 312 - Internet Concepts / Weigle 22
Multimedia Internet Mail Extensions
(MIME)
• Defines plain-text encoding for media
attachments
– SMTP (email) requires all data to be 7-bit ASCII
characters
– All non-ASCII data must be encoded as ASCII strings

• Example doc types: text/html, image/jpeg,


audio/mpeg, etc.
CS 312 - Internet Concepts / Weigle 23
MIME Content-Types
Content-Type: <type>/<subtype>[; <parameters>]

Content-Type: text/plain; charset=us-ascii


Content-Type: application/pdf; filename=foo.pdf
• Text • Video
– Subtypes: plain, html, css – Subtypes: mpeg, quicktime
• Image • Application
– Subtypes: jpeg, gif, png – Other data that must be
• Audio processed by reader before it
– Subtypes: aac, mpeg, mp4 is "viewable"
– Subtypes: gzip, pdf, json,
ref: Common MIME types vnd.ms-excel
CS 312 - Internet Concepts / Weigle 24
Outline
• Hypertext Transfer Protocol (HTTP)
• Request/Response Formats
• Security: HTTPS, TLS
• Caching
• Web Developer Tools

CS 312 - Internet Concepts / Weigle 25


HTTPS

• Hypertext Transfer Protocol Secure


• Transferred using HTTP, encrypted
– with default TCP port 443
• For Web pages, the URI begins with https://
CS 312 - Internet Concepts / Weigle 26
HTTPS
Eliminates
• Secure version of HTTP snooping
enc
ryp
ted
• Provides server authentication and enc
encrypted communication ryp
ted
d
r ypte
en c
• Encrypts the session data ted
yp
– Using either the SSL (Secure Socket en cr
Layer) protocol or the TLS (Transport
Layer Security) protocol

CS 312 - Internet Concepts / Weigle 27


Transport Layer Security (TLS)
• Works above TCP but below
application protocols (HTTP,
SMTP, etc.)

• Protocol steps
– Certificate authentication (usually
server auth only)
– Encryption key registration
– Encryption/decryption of message

CS 312 - Internet Concepts / Weigle 28


Transport Layer Security (TLS)
• Advantage
– produces server authentication,
end-to-end encryption

• Disadvantages
– computationally expensive, due to
encryption/decryption
– $$ expensive, requires servers to
have certificates from trusted
certificate authorities (CAs)

CS 312 - Internet Concepts / Weigle 29


Outline
• Hypertext Transfer Protocol (HTTP)
• Request/Response Formats
• Security: HTTPS, TLS
• Caching
• Web Developer Tools

CS 312 - Internet Concepts / Weigle 30


Web Caches
• Web pages can be stored at places between the server and client
– browser cache
– proxy server cache

• When a page is requested:


– Is it in the browser cache? Yes -> Use it!
– No -> Is it in proxy server cache? Yes -> Use it and save in browser
cache
– No -> Request from server
– Proxy server saves the response
– Browser saves the response in browser cache

CS 312 - Internet Concepts / Weigle 31


Browser Caches

• Browsers cache content from servers to avoid future


server interactions to retrieve the same content
CS 312 - Internet Concepts / Weigle 32
Proxy Server Caches

• Proxy servers can serve as caches for groups of hosts.


CS 312 - Internet Concepts / Weigle 33
HTTP Conditional GET
• If object in browser cache is Client Server
“fresh,” the server won’t re-
send it HTTP request object
– Browsers save current date along If-modified-since: <date> not
with object in cache modified
• Client specifies the date of HTTP response
cached copy in HTTP request 304 Not Modified
If-modified-since:<date>

• Server’s response contains the HTTP request


object only if it has been If-modified-since: <date> object
changed since the cached date modified
HTTP response
• Otherwise server returns 200 OK
HTTP/1.0 304 Not Modified <data>
CS 312 - Internet Concepts / Weigle 34
Caches
• Why?
– Reduce latency (time for request start to complete)
– Reduce network traffic

• What problems arise?


– Cached pages become obsolete

• Cache control is a policy for replacing cached pages based on:


– Freshness: how old is the resource; server can control “use-by” date
– Validation: cache can request a last modified date from server
– Invalidation: cache “sees” an update for the resource
CS 312 - Internet Concepts / Weigle 35
Cache-Control Response Headers
• Cache-Control:
– Private: only browser can cache
– Public: anyone can cache % curl -I https://www.cnn.com
HTTP/2 200
– No-store: nobody can cache content-type: text/html; charset=utf-8
– No-cache: anyone can cache, must use x-servedbyhost: ::ffff:127.0.0.1
validation access-control-allow-origin: *
cache-control: max-age=60
...
• Cache-Control: max-age = 3600 accept-ranges: bytes
– Cache good for 3600 secs date: Thu, 10 Sep 2020 18:56:45 GMT
...
x-served-by: cache-dca17730-DCA
x-cache: HIT
• X-Cache: various CDN diagnostics x-cache-hits: 1
x-timer: S1599764205.484320,VS0,VE3
vary: x-fastab-0,x-fastab-4, Accept-
Encoding
content-length: 1134340

CS 312 - Internet Concepts / Weigle 36


Cache-Control Response Headers
• Cache-Control:
– Private: only browser can cache % curl -I https://www.vacu.org
– Public: anyone can cache HTTP/2 200
cache-control: max-age=180, public
– No-store: nobody can cache content-language: en
– No-cache: anyone can cache, must use content-type: text/html; charset=UTF-8
validation etag: W/"1599762150"
expires: Sun, 19 Nov 1978 05:00:00 GMT
last-modified: Thu, 10 Sep 2020 18:22:30
• GMT
Cache-Control: max-age = 3600
...
– Cache good for 3600 secs date: Thu, 10 Sep 2020 18:59:58 GMT
x-served-by: cache-mdw17337-MDW, cache-
dca17742-DCA
• X-Cache: various CDN diagnostics x-cache: HIT, MISS
x-cache-hits: 1, 0
vary: Accept-Encoding, Cookie, Cookie,
• Expires: Mon, 26 Aug 2019 08:00:00 Cookie
EDT age: 46
– specific time accept-ranges: bytes
content-length: 236784
CS 312 - Internet Concepts / Weigle 37
Outline
• Hypertext Transfer Protocol (HTTP)
• Request/Response Formats
• Security: HTTPS, TLS
• Caching
• Web Developer Tools

CS 312 - Internet Concepts / Weigle 38


Web Developer Tools - Firefox
● Screenshot: window or entire page
○ Helps to determine design,
problems, instructions, etc

CS 312 - Internet Concepts / Weigle 39


Web Developer Tools - Firefox

CS 312 - Internet Concepts / Weigle 40


Firefox - WDT - Inspector

CS 312 - Internet Concepts / Weigle 41


Firefox - WDT - Web Console

CS 312 - Internet Concepts / Weigle 42


Firefox - WDT - Network

CS 312 - Internet Concepts / Weigle 43


Firefox - WDT - HTTP Headers

CS 312 - Internet Concepts / Weigle 44


Firefox - WDT - Style Editor

CS 312 - Internet Concepts / Weigle 45


Firefox - WDT - Accessibility

CS 312 - Internet Concepts / Weigle 46


WebPageTest

source: WebPageTest
CS 312 - Internet Concepts / Weigle 47
Talking to HTTP servers…
% curl --head https://www.cs.odu.edu/~mweigle/
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 03 Jan 2020 18:12:10 GMT
Content-Type: text/html; charset=ISO-8859-1;
Connection: keep-alive
Expires: Tue, 01 Jan 2002 00:00:00 GMT https://curl.haxx.se/docs/manpage.html
Cache-Control: no-store, no-cache, must-revalidate
Front-End-Https: on

% curl -I http://www.google.com/
HTTP/1.1 200 OK
Cache-Control: private, max-age=0
Date: Mon, 12 Jan 2009 15:45:57 GMT
Expires: -1
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=9a80d3f602b685f3:TM=1231775157:LM=1231775157:S=imGxRyNsTD0Zczm5;
expires=Wed, 12-Jan-2011 15:45:57 GMT; path=/; domain=.google.com
Server: gws
Content-Length: 0
CS 312 - Internet Concepts / Weigle 48
more curl…
% curl https://www.cs.odu.edu/~mweigle/
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--<html xmlns="http://www.w3.org/1999/xhtml" $GmaIEFix>-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Home | Michele C. Weigle </title>
<meta http-equiv='Content-Style-Type' content='text/css' />
...
% curl -i https://www.cs.odu.edu/~mweigle/
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 03 Jan 2020 18:11:04 GMT
Content-Type: text/html; charset=ISO-8859-1;
Transfer-Encoding: chunked
Connection: keep-alive
Expires: Tue, 01 Jan 2002 00:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Vary: Accept-Encoding
Front-End-Https: on

<!DOCTYPE html
...

CS 312 - Internet Concepts / Weigle 49


wget
% wget https://www.cs.odu.edu/~mweigle/
--2020-05-25 14:48:26-- https://www.cs.odu.edu/~mweigle/
Resolving www.cs.odu.edu (www.cs.odu.edu)... 128.82.4.161
Connecting to www.cs.odu.edu (www.cs.odu.edu)|128.82.4.161|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'index.html'

index.html [ <=> ] 20.92K --.-KB/s in 0.005s

2020-05-25 14:48:27 (3.95 MB/s) - 'index.html' saved [21420]

CS 312 - Internet Concepts / Weigle 50


curl vs. wget: https://daniel.haxx.se/docs/curl-vs-wget.html

curl and wget are useful, but


issuing raw HTTP requests is
more fun...

CS 312 - Internet Concepts / Weigle 51


% telnet example.com 80
Trying 93.184.216.34...
Connected to example.com.
GET
Escape character is '^]'.
GET / HTTP/1.1
Host: example.com
Connection: close
Request Port 80 is the default
(ends w/ CRLF) HTTP port
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: max-age=604800
Content-Type: text/html; charset=UTF-8
Date: Fri, 03 Jan 2020 18:33:26 GMT
Etag: "3147526947+gzip"
Expires: Fri, 10 Jan 2020 18:33:26 GMT
Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT Response
Server: ECS (dcb/7EEB)
Vary: Accept-Encoding (CRLF separates
header from body)
X-Cache: HIT
Content-Length: 1256
Connection: close

<!doctype html>
<html>
...
Connection closed by foreign host.

CS 312 - Internet Concepts / Weigle 52


This doesn't work for HTTPS
% telnet www.cs.odu.edu 443
Trying 128.82.4.2... Port 443 is the default HTTPS port
Connected to xenon.cs.odu.edu.
Escape character is '^]'.
GET / HTTP/1.1
Host: www.cs.odu.edu
Connection: close

HTTP/1.1 400 Bad Request


Server: nginx
In HTTPS, HTTP is tunnelled
Date: Fri, 03 Jan 2020 18:54:33 GMT
Content-Type: text/html
Transfer-Encoding: chunked
inside encrypted layer, so no
Connection: close
plain-text
108
<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx</center>
</body>
</html>

Connection closed by foreign host.

CS 312 - Internet Concepts / Weigle 53


HEAD
% telnet example.com 80
Trying 93.184.216.34...
Connected to example.com.
Escape character is '^]'.
HEAD / HTTP/1.1
Host: example.com
Connection: close

HTTP/1.1 200 OK
Content-Encoding: gzip
Accept-Ranges: bytes
Cache-Control: max-age=604800
Content-Type: text/html; charset=UTF-8
Date: Fri, 03 Jan 2020 18:39:17 GMT
Etag: "3147526947+gzip"
Expires: Fri, 10 Jan 2020 18:39:17 GMT
Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT
Server: ECS (dcb/7EEF)
X-Cache: HIT
Content-Length: 648
Connection: close

Connection closed by foreign host.

CS 312 - Internet Concepts / Weigle 54


OPTIONS
% telnet example.com 80
Trying 93.184.216.34...
Connected to example.com.
Escape character is '^]'.
OPTIONS / HTTP/1.1
Connection: close
Host: example.com

HTTP/1.1 200 OK
Allow: OPTIONS, GET, HEAD, POST
Cache-Control: max-age=604800
Content-Type: text/html; charset=UTF-8
Date: Fri, 03 Jan 2020 18:41:43 GMT
Expires: Fri, 10 Jan 2020 18:41:43 GMT
Server: EOS (vny006/044E)
Content-Length: 0
Connection: close

Connection closed by foreign host.

CS 312 - Internet Concepts / Weigle 55


HTTP Response Codes
● 1xx: Informational - Request received, continuing
process
● 2xx: Success - The action was successfully received,
understood, and accepted
● 3xx: Redirection - Further action must be taken in
order to
complete the request
● 4xx: Client Error - The request contains bad syntax or
cannot be fulfilled
● 5xx: Server Error - from
TheSectionserver failed
6 of RFC 7231, to fulfill an
https://tools.ietf.org/html/rfc7231#section-6
apparently valid request
CS 312 - Internet Concepts / Weigle 56
501 - Not Implemented
% telnet awoiaf.westeros.org 80
Trying 104.26.6.227...
Connected to awoiaf.westeros.org.
Escape character is '^]'.
NOTAREALMETHOD /index.html HTTP/1.1
Connection: close
Host: awoiaf.westeros.org

HTTP/1.1 501 Not Implemented


Date: Fri, 03 Jan 2020 18:48:14 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: close
Set-Cookie: __cfduid=de0777e48aa880e4c73812856018a23121578077294; expires=Sun, 02-Feb-20 18:48:14 GMT; path=/;
domain=.westeros.org; HttpOnly; SameSite=Lax
CF-Cache-Status: DYNAMIC
Server: cloudflare
CF-RAY: 54f7254ec90256af-IAD

15d
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>501 - Not Implemented</title>
</head>
<body>
<h1>501 - Not Implemented</h1>
</body>
</html>

Connection closed by foreign host.


CS 312 - Internet Concepts / Weigle 57
% telnet awoiaf.westeros.org 80
Trying 104.26.7.227...
Connected to awoiaf.westeros.org.
Escape character is '^]'.
301 - Moved
OPTIONS / HTTP/1.1
Connection: close
Host: awoiaf.westeros.org
Permanently
HTTP/1.1 301 Moved Permanently
Date: Fri, 03 Jan 2020 19:05:05 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: close
Set-Cookie: __cfduid=ddd3b69f46dd1c9ad7774cbeb1ab3e14f1578078305; expires=Sun, 02-Feb-
20 19:05:05 GMT; path=/; domain=.westeros.org; HttpOnly; SameSite=Lax
X-Content-Type-Options: nosniff
Set-Cookie: PHPSESSID=cas9kgnt1miiple9u2dhand5i3; path=/
Pragma: no-cache
Vary: Accept-Encoding, Cookie
Last-Modified: Fri, 03 Jan 2020 19:05:05 GMT
Location: https://awoiaf.westeros.org/index.php/Main_Page
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: private, max-age=0, s-maxage=300
Accept-Ranges: bytes
X-Cache: MISS
...
CS 312 - Internet Concepts / Weigle 58
Multiple redirects
% curl -I -L https://t.co/Nbleumtera
HTTP/1.1 301 Moved Permanently
cache-control: private,max-age=300
content-length: 0

possible!
date: Fri, 03 Jan 2020 19:09:53 GMT
expires: Fri, 03 Jan 2020 19:14:53 GMT
location: http://bit.ly/2QIY1jW
server: tsa_a
set-cookie: muc=d8cec1cd-a7d1-40db-8d76-737b85d13f08; Max-Age=63072000; Expires=Sun, 2 Jan 2022 19:09:53 GMT;
Domain=t.co
strict-transport-security: max-age=0
vary: Origin
x-connection-hash: fc0224ab9bcbfa6261c63e01389c5472
x-response-time: 8

HTTP/1.1 301 Moved Permanently


Server: nginx
Date: Fri, 03 Jan 2020 19:09:53 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 153
Cache-Control: private, max-age=90
Location: https://www.odu.edu/news/2019/10/former_odu_pitcher_i#.Xg3_3RdKigR
Via: 1.1 google

HTTP/1.1 200 OK
Date: Fri, 03 Jan 2020 19:09:53 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux)
Vary: Host
Accept-Ranges: bytes
Connection: close
Content-Type: text/html; charset=UTF-8
Set-Cookie: BIGipServerWEB_HTTPS_PROD.app~WEB_HTTPS_PROD_pool_campus=rd627o00000000000000000000ffff8052619fo80;
path=/; CS 312 - Internet Concepts / Weigle 59
302 - Found
% curl -I https://dx.doi.org/10.1145/1998076.1998100
HTTP/2 302
date: Wed, 09 Sep 2020 21:54:18 GMT
content-type: text/html;charset=utf-8
content-length: 195
set-cookie: __cfduid=df8601cbe1c37abae1beb49becc95d4ac1599688458;
expires=Fri, 09-Oct-20 21:54:18 GMT; path=/; domain=.doi.org; HttpOnly;
SameSite=Lax; Secure
vary: Accept
location: http://portal.acm.org/citation.cfm?doid=1998076.1998100
expires: Wed, 09 Sep 2020 22:32:29 GMT
cf-cache-status: DYNAMIC
cf-request-id: 051675da7a0000255023bec200000001
expect-ct: max-age=604800,
report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
strict-transport-security: max-age=31536000; includeSubDomains; preload
server: cloudflare
cf-ray: 5d0425a3f83e2550-IAD

CS 312 - Internet Concepts / Weigle 60


404 - Not Found
% telnet www.cs.odu.edu 80
Trying 128.82.4.2...
Connected to xenon.cs.odu.edu. % curl -I
Escape character is '^]'. https://www.cs.odu.edu/lasdkfjalsdkfjldaskfj
HEAD /lasdkfjalsdkfjldaskfj HTTP/1.1 404 Not Found
HTTP/1.1 Server: nginx
Host: www.cs.odu.edu Date: Fri, 11 Sep 2020 18:46:37 GMT
Connection: close Content-Type: text/html; charset=iso-8859-
1
HTTP/1.1 404 Not Found
Connection: keep-alive
Server: nginx
Date: Fri, 03 Jan 2020 19:13:06
GMT
Content-Type: text/html
Connection: close

Connection closed by foreign


host.
CS 312 - Internet Concepts / Weigle 61
400 - Bad Request
% telnet www.cs.odu.edu 80
Trying 128.82.4.2...
Connected to xenon.cs.odu.edu.
Escape character is '^]'.
HEAD http://www.cs.odu.edu/~mln/ Missing required header
HTTP/1.1 Host:
Connection: close www.cs.odu.edu

HTTP/1.1 400 Bad Request


Server: nginx
Date: Fri, 03 Jan 2020 19:18:39 GMT
Content-Type: text/html
Connection: close

Connection closed by foreign host.


CS 312 - Internet Concepts / Weigle 62

You might also like