1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Use Cache-Control when --no-cache is specified.

This commit is contained in:
Giuseppe Scrivano 2011-08-06 10:56:07 +02:00
parent 9b21660d70
commit 1d9bb1c7b0
2 changed files with 23 additions and 11 deletions

View File

@ -1,7 +1,13 @@
2011-08-06 Giuseppe Scrivano <gscrivano@gnu.org>
* http.c (gethttp): Add the Cache-Control HTTP header when --no-cache
is specified.
Reported by: Коренберг Марк <socketpair@gmail.com>.
2011-08-05 Giuseppe Scrivano <gscrivano@gnu.org>
* utils.c (acceptable): Accept the file if it is the specified output
destination.
* utils.c (acceptable): Accept always the file if it is the specified
output destination.
Reported by: Shai Berger <shai@platonix.com>
2011-08-05 Giuseppe Scrivano <giuseppe@southpole.se>
@ -13,14 +19,14 @@
* cookies.c (parse_set_cookie): If the value is quoted, do not modify
it.
Reported by: Nirgal Vourgère <jmv_deb@nirgal.com>
Reported by: Nirgal Vourgère <jmv_deb@nirgal.com>
2011-07-29 Giuseppe Scrivano <giuseppe@southpole.se>
* log.c (logprintf): Exit immediately on a SIGPIPE error.
Reported by: Noèl Köthe <noel@debian.org>.
Reported by: Noèl Köthe <noel@debian.org>.
2011-07-26 Carlos Martín Nieto <carlos@cmartin.tk> (tiny change)
2011-07-26 Carlos Martín Nieto <carlos@cmartin.tk> (tiny change)
* init.c (home_dir): Allocate path buffer dinamically.
@ -109,7 +115,7 @@
SSL_pending.
(openssl_peek): Make the call non-blocking.
2011-04-11 Cristian Rodríguez <crrodriguez@opensuse.org> (tiny change)
2011-04-11 Cristian Rodríguez <crrodriguez@opensuse.org> (tiny change)
* openssl.c (ssl_init) [! OPENSSL_NO_SSL2]: Use SSLv2 only when
available.
@ -1636,7 +1642,7 @@
* html-url.c, http.c: Avoid casts in a couple spots.
2008-05-30 Henri Häkkinen <henux@users.sourceforge.net>
2008-05-30 Henri Häkkinen <henux@users.sourceforge.net>
* cookies.c, ftp-basic.c, hash.c, html-url.c, http-ntlm.c, http.c,
init.c, log.c, main.c, progress.c, ptimer.c, spider.c, url.c,
@ -8627,7 +8633,7 @@
2001-02-16 Dan Harkless <wget@harkless.org>
* init.c (commands): Hack Kampbjørn <hack@hackdata.com> discovered
* init.c (commands): Hack Kampbjørn <hack@hackdata.com> discovered
that "httpsproxy" had been inserted into commands[] out of
alphabetical order, causing "BUG: unknown command `httpuser'".
@ -8679,7 +8685,7 @@
characters.
(skip_uname): Ditto.
2001-02-11 Hack Kampbjørn <hack@hackdata.com>
2001-02-11 Hack Kampbjørn <hack@hackdata.com>
* url.c (parseurl): Debug-print u->ftp_type.
@ -8787,7 +8793,7 @@
2000-12-30 Dan Harkless <wget@harkless.org>
* ftp.c, http.c: Applied Hack Kampbjørn <hack@hackdata.com>'s
* ftp.c, http.c: Applied Hack Kampbjørn <hack@hackdata.com>'s
patch to deal with h_errno not being defined in netdb.h under Cygwin.
2000-12-18 Csaba Raduly <csaba.raduly@sophos.com>

View File

@ -1619,7 +1619,13 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
request_set_header (req, "Referer", (char *) hs->referer, rel_none);
if (*dt & SEND_NOCACHE)
request_set_header (req, "Pragma", "no-cache", rel_none);
{
/* Cache-Control MUST be obeyed by all HTTP/1.1 caching mechanisms... */
request_set_header (req, "Cache-Control", "no-cache, must-revalidate", rel_none);
/* ... but some HTTP/1.0 caches doesn't implement Cache-Control. */
request_set_header (req, "Pragma", "no-cache", rel_none);
}
if (hs->restval && !opt.timestamping)
request_set_header (req, "Range",
aprintf ("bytes=%s-",