Datasheet

12:36:00 200 GET /buzzwatch/img/aqua-hd-rt.gif (image/gif)
12:36:00 200 GET /buzzwatch/img/aqua-hd-close.gif (image/gif)
12:37:00 200 GET /buzzwatch/watch.php (application/xml)
This log uses a custom log format defined as “%{%T}t %>s %m %U%q (%{Content-Type}o)” on an
Apache 2.x web server. This format would not be appropriate for a production server where you’ll want
to see important information such as the date and the client IP addresses, but it has the benefit of being
easy to print in this book and contains the minimum information needed to understand what’s going on.
The whole exchange is triggered by the first request, which is executed when you open the page in your
browser:
12:35:59 200 GET /buzzwatch/index.html (text/html)
If you look at what is exchanged on the wire, you’ll find a request sent by your browser to the web server:
GET /buzzwatch/ HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060608
Ubuntu/dapper-security Epiphany/2.14 Firefox/1.5.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;
q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Note that the line breaks between 20060608 and Ubuntu and between text/html; and
q=0.9,text/plain; have been added for readability reasons and are not present in the exchange
over the wire.
In this request, the browser is asking to get (
GET in the first line is the HTTP request) a page at location
/buzzwatch/ using version 1.1 of HTTP and contacting the host localhost. The remaining lines are
called HTTP headers and contain more information about the browser, the kind of resources it can handle,
and the way it would like cached data to be handled. The answer from the server to the web browser is:
HTTP/1.1 200 OK
Date: Fri, 21 Jul 2006 10:35:59 GMT
Server: Apache/2.0.55 (Ubuntu) PHP/5.1.2
Last-Modified: Thu, 20 Jul 2006 18:05:26 GMT
ETag: “240449-2985-3970c580”
Accept-Ranges: bytes
Content-Length: 10629
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN”
“http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>
<html>
<head>
7
Hello Web 2.0 World
04_087889 ch01.qxp 5/2/07 12:56 PM Page 7