689
|
1 |
-*- mode: outline; coding: utf-8 -*-
|
|
2 |
|
|
3 |
* Web server in Cygwin.
|
|
4 |
|
|
5 |
$ setup -p apache2,lighttpd,dhttp
|
|
6 |
|
690
|
7 |
* Encoding HTTP data.
|
|
8 |
|
|
9 |
Starting with HTTP/1.1, web clients can indicate support for compression:
|
|
10 |
|
|
11 |
Accept-Encoding: gzip, deflate
|
|
12 |
|
|
13 |
Web server notifies the web client of this via the Content-Encoding header in the response:
|
|
14 |
|
|
15 |
Content-Encoding: gzip
|
|
16 |
|
692
|
17 |
* ETags.
|
|
18 |
|
|
19 |
Server respond:
|
|
20 |
|
|
21 |
HTTP/1.1 200 OK
|
|
22 |
Last-Modified: Tue, 12 Dec 2006 03:03:59 GMT
|
|
23 |
ETag: "10c24bc-4ab-457e1c1f"
|
|
24 |
Content-Length: 12195
|
|
25 |
|
|
26 |
Lately client send:
|
|
27 |
|
|
28 |
GET /i/yahoo.gif HTTP/1.1
|
|
29 |
Host: us.yimg.com
|
|
30 |
If-Modified-Since: Tue, 12 Dec 2006 03:03:59 GMT
|
|
31 |
If-None-Match: "10c24bc-4ab-457e1c1f"
|
|
32 |
|
|
33 |
and get respond:
|
|
34 |
|
|
35 |
HTTP/1.1 304 Not Modified
|
|
36 |
|