# HG changeset patch # User Oleksandr Gavenko # Date 1330608289 -7200 # Node ID 1a51a3c2e4facbc8b3aca5785effb32b7d1615c0 # Parent 1b5d6f996800956372531442e5ac157e6366199e Merge 'wget.txt' and 'http.txt' to 'http.rst'. diff -r 1b5d6f996800 -r 1a51a3c2e4fa http.rst --- a/http.rst Sat Feb 25 18:14:52 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ --*- mode: outline; coding: utf-8 -*- - -* Web server in Cygwin. - - $ setup -p apache2,lighttpd,dhttp - -* Encoding HTTP data. - -Starting with HTTP/1.1, web clients can indicate support for compression: - - Accept-Encoding: gzip, deflate - -Web server notifies the web client of this via the Content-Encoding header in the response: - - Content-Encoding: gzip - -* ETags. - -Server respond: - - HTTP/1.1 200 OK - Last-Modified: Tue, 12 Dec 2006 03:03:59 GMT - ETag: "10c24bc-4ab-457e1c1f" - Content-Length: 12195 - -Lately client send: - - GET /i/yahoo.gif HTTP/1.1 - Host: us.yimg.com - If-Modified-Since: Tue, 12 Dec 2006 03:03:59 GMT - If-None-Match: "10c24bc-4ab-457e1c1f" - -and get respond: - - HTTP/1.1 304 Not Modified - diff -r 1b5d6f996800 -r 1a51a3c2e4fa wget.rst --- a/wget.rst Sat Feb 25 18:14:52 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ --*- mode: outline; coding: utf-8 -*- - -* Recursive site download. - - $ wget -r -np -nc -e robots=off -p -k TOP-LEVEL-URL - -* Get server response header. - - $ wget --server-response http://example.com - $ wget -S http://example.com # short variant - -* View cookies from site. - - $ wget --save-cookies FILE -O - http://google.com >/dev/null - -* Send cookies to site. - - $ wget --load-cookies FILE http://google.com - -* Send specific header line. - - $ wget --header='Accept-Charset: iso-8859-2' --header='Accept-Language: hr' http://fly.srk.fer.hr/ - -* Send POST request. - -Log in to the server. This can be done only once. - - $ wget --save-cookies cookies.txt --post-data 'user=foo&password=bar' http://server.com/auth.php - -Now grab the page or pages we care about. - - $ wget --load-cookies cookies.txt -p http://server.com/interesting/article.php