1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +00:00

Handling If-Modified-Since.

This commit is contained in:
Witold Filipczyk 2006-10-08 16:24:47 +02:00 committed by Witold Filipczyk
parent 7f0fb0440c
commit cc6c59d932
2 changed files with 9 additions and 0 deletions

7
src/cache/cache.c vendored
View File

@ -181,6 +181,13 @@ get_validated_cache_entry(struct uri *uri, enum cache_mode cache_mode)
if (!cached || cached->incomplete)
return NULL;
if (uri->protocol == PROTOCOL_HTTP || uri->protocol == PROTOCOL_HTTPS
|| uri->protocol == PROTOCOL_FILE /* CGI */) {
if (cached->last_modified && cache_mode == CACHE_MODE_NORMAL)
return NULL;
}
/* A bit of a gray zone. Delete the entry if the it has the stricktest
* cache mode and we don't want the most aggressive mode or we have to
* remove the redirect or the entry expired. Please enlighten me.

View File

@ -571,6 +571,8 @@ http_send_header(struct socket *socket)
return;
}
if (!conn->cached) conn->cached = find_in_cache(uri);
talking_to_proxy = IS_PROXY_URI(conn->uri) && !conn->socket->ssl;
use_connect = connection_is_https_proxy(conn) && !conn->socket->ssl;