Example HTTP Sequence

Exactly what happens when you use a browser to access a file on the web?
We can find out by accessing a particular URL using a HTTP viewer.
To see what happens, we will retrieve http://www.cse.ust.hk/image_forensics

We give the URL to the HTTP viewer and it then sends a request to the server asking for the file.
The request is send and the response it receives are displayed.
The following output is generated by the HTTP viewer at http://www.rexswain.com/httpview.html.

Parameters given to the HTTP Viewer:

URL = http://www.cse.ust.hk/image_forensics/
UAG = Mozilla/4.8 [en] (Windows NT 5.0; U)
AEN =
REQ = GET ; VER = 1.1 ; FMT = AUTO

The request that gets sent by the HTTP viewer to the server www.cse.ust.hk:

GET /image_forensics/ HTTP/1.1
Host: www.cse.ust.hk
User-Agent: Mozilla/4.8 [en] (Windows NT 5.0; U)
Connection: close
Note: a server automatically assumes you mean 'index.html' if no exact file is specified.
So http://www.cse.ust.hk/image_forensics/ is really http://www.cse.ust.hk/image_forensics/index.html.

The low-level process of sending the request to the server:

• Finding host IP address...
• Host IP address = 143.89.40.4
• Finding TCP protocol...
• Binding to local socket...
• Connecting to host...
• Sending request...
• Waiting for response...

(The above low-level details are not part of the COMP303 course content).

Header received from the server:

HTTP/1.1·200·OK(CR)(LF)
Date:·Mon,·01·Nov·2010·01:34:34·GMT(CR)(LF)
Server:·Apache(CR)(LF)
Last-Modified:·Wed,·07·Nov·2007·17:40:44·GMT(CR)(LF)
ETag:·"7a58ba3c-1789-43e5a3fba5f00"(CR)(LF)
Accept-Ranges:·bytes(CR)(LF)
Content-Length:·6025(CR)(LF)
Connection:·close(CR)(LF)
Content-Type:·text/html(CR)(LF)
(CR)(LF)

Note: HT=Hard tab; LF= line feed; CR=Carriage return

Content received from server (length = 6025):

<!DOCTYPE·html·PUBLIC·"-//W3C//DTD·XHTML·1.1//EN"·"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">(LF)
<html·xmlns="http://www.w3.org/1999/xhtml">(LF)
(HT)<head>(LF)
(HT,HT)<title>Image·Forensics·Search·System·(IFSS)</title>(LF)
(HT,HT)<meta·http-equiv="Content-Type"·content="text/html;·charset=utf-8">(LF)
(HT,HT)<meta·name="description"·content="This·web·site·contains·the·source·code·for·a·program·which
(HT,HT,HT,HT)·searches·for·an·image·in·a·user's·hard·disk."·/>(LF)
(HT,HT)<meta·name="keywords"·content="image·forensics,·image·search,·illegal·images"·/>(LF)
(HT,HT)<link·rel="stylesheet"·type="text/css"·href="style.css"·/>(LF)
(HT)</head>(LF)
(HT)<body>(LF)
(HT,HT)<center>(LF)
(HT,HT,HT)<div·class="banner"></div>(LF)
(HT,HT,HT)<div·class="menu">(LF)
(HT,HT,HT,HT)<div·class="submenu·first_sub">(LF)
(HT,HT,HT,HT,HT)<a·class="selected"·alt="Introduction"·href="index.html">Introduction</a>(LF)
(HT,HT,HT,HT)</div>(LF)
(HT,HT,HT,HT)<div·class="submenu">(LF)
(HT,HT,HT,HT,HT)<a·alt="Download"·href="download.html">Download</a>(LF)
(HT,HT,HT,HT)</div>(LF)
(HT,HT,HT,HT)<div·class="submenu">(LF)
(HT,HT,HT,HT,HT)<a·alt="Installation"·href="installation.html">Installation</a>(LF)
(HT,HT,HT,HT)</div>(LF)
(HT,HT,HT,HT)<div·class="submenu">(LF)
(HT,HT,HT,HT,HT)<a·alt="User·manual"·href="user_manual.html">User·Guide</a>(LF)
(HT,HT,HT,HT)</div>(LF)
(HT,HT,HT,HT)<div·class="submenu">(LF)
(HT,HT,HT,HT,HT)<a·alt="Examples"·href="examples.html">Examples</a>(LF)
(HT,HT,HT,HT)</div>(LF)
(HT,HT,HT,HT)<div·class="submenu">(LF)
(HT,HT,HT,HT,HT)<a·alt="Requirements"·href="requirements.html">Requirements</a>(LF)
(HT,HT,HT,HT)</div>(LF)
(HT,HT,HT,HT)<div·class="submenu">(LF)
(HT,HT,HT,HT,HT)<a·alt="License"·href="license.html">License</a>(LF)
(HT,HT,HT,HT)</div>(LF)
(HT,HT,HT,HT)<div·class="submenu">(LF)
(HT,HT,HT,HT,HT)<a·alt="About·us"·href="about_us.html">About·us</a>(LF)
(HT,HT,HT,HT)</div>(LF)
(HT,HT,HT)</div>(LF)
(LF)
(HT,HT,HT)<div·class="body">(LF)
(HT,HT,HT,HT,HT)<div·class="title">(LF)
(HT,HT,HT,HT,HT,HT)Image·Forensics·Search·System(LF)
(HT,HT,HT,HT,HT)</div>(LF)
(HT,HT,HT,HT,HT)<div·class="clear">(LF)
(HT,HT,HT,HT,HT,HT)&nbsp;(LF)
(HT,HT,HT,HT,HT)</div>(LF)
(HT,HT,HT,HT,HT)<div·class="clear">(LF)
(HT,HT,HT,HT,HT,HT)&nbsp;(LF)
(HT,HT,HT,HT,HT)</div>(LF)
(LF)
(HT,HT,HT,HT,HT)<div·class="what_title">(LF)
(HT,HT,HT,HT,HT,HT,HT)What·is·IFSS?(LF)
(HT,HT,HT,HT,HT)</div>(LF)
(LF)
(HT,HT,HT,HT,HT)<div·class="clear_float">(LF)
(HT,HT,HT,HT,HT,HT)&nbsp;(LF)
(HT,HT,HT,HT,HT)</div>(LF)
(LF)
(HT,HT,HT,HT,HT)<div·class="content_1">(LF)
(HT,HT,HT,HT,HT,HT)Image·Forensic·Search·System·(IFSS)·is·free,·open·source·software·for·image
(HT,HT,HT,HT,HT,HT,HT)·searching.·It·allows·you·to(LF)
(HT,HT,HT,HT,HT,HT)<ul>(LF)
(HT,HT,HT,HT,HT,HT,HT)<li>search·a·target·image·within·another·image,·or</li>(LF)
(HT,HT,HT,HT,HT,HT,HT)<li>search·images·that·are·similar·to·a·target·image.</li>(LF)
(HT,HT,HT,HT,HT,HT)</ul>(LF)
(HT,HT,HT,HT,HT,HT)<div·class="image_center">(LF)
(HT,HT,HT,HT,HT,HT,HT)<img·src="images/pic_flow.png"/>(LF)
(HT,HT,HT,HT,HT,HT,HT)<div·class="caption">An·example·of·how·the·IFSS·system·can·be·used</div>(LF)
(HT,HT,HT,HT,HT,HT)</div>(LF)
(LF)
(HT,HT,HT,HT,HT,HT)<div·class="clear">(LF)
(HT,HT,HT,HT,HT,HT,HT)&nbsp;(LF)
(HT,HT,HT,HT,HT,HT)</div>(LF)
(HT,HT,HT,HT,HT)</div>(LF)
(LF)
(HT,HT,HT)</div>(LF)
(HT,HT)</center>(LF)
(HT)</body>(LF)
</html>(LF)