GET
RequestGET
request (and other
HTTP request types, see later) to
additionally send a series of optional Request
Headers along with the request. For example, here's a
typical request to ironbark, snarfed from the local network:
The request headers are terminated with a blank line -- hence the need for two newlines, as seen in the first slide of today's lecture. It's also possible for the request to contain a "message body", just like a response message -- we defer discussion of this until later in the unit.GET /index.html HTTP/1.0 User-Agent: Mozilla/3.0 (X11; IRIX 5.3 IP12) Host: ironbark.bendigo.latrobe.edu.au Accept: image/gif, image/jpeg, */* Referer: http://ironbark.bendigo.latrobe.edu.au/index.html
If-modified-since:
", which takes an HTTP
standard GMT time/date string as its value. If the requested page
has not, in fact, been modified in the specified period, it won't
be returned -- instead, a "304 Not Modified
"
response is sent. This is called a Conditional-GET
and is very useful in support of caching, of which
more later.