Support If-Modified-Since for https as well as http.
PR: 224426 Submitted by: zsnafzig@edu.uwaterloo.ca MFC after: 1 week
This commit is contained in:
parent
b847b083a8
commit
deb1ff232d
@ -552,9 +552,10 @@ fetch(char *URL, const char *path)
|
||||
goto signal;
|
||||
if (f == NULL) {
|
||||
warnx("%s: %s", URL, fetchLastErrString);
|
||||
if (i_flag && strcmp(url->scheme, SCHEME_HTTP) == 0
|
||||
&& fetchLastErrCode == FETCH_OK
|
||||
&& strcmp(fetchLastErrString, "Not Modified") == 0) {
|
||||
if (i_flag && (strcmp(url->scheme, SCHEME_HTTP) == 0 ||
|
||||
strcmp(url->scheme, SCHEME_HTTPS) == 0) &&
|
||||
fetchLastErrCode == FETCH_OK &&
|
||||
strcmp(fetchLastErrString, "Not Modified") == 0) {
|
||||
/* HTTP Not Modified Response, return OK. */
|
||||
r = 0;
|
||||
goto done;
|
||||
|
Loading…
x
Reference in New Issue
Block a user