svn commit: r333572 - head/usr.bin/fetch

Dag-Erling Smørgrav des at FreeBSD.org
Sat May 12 17:04:41 UTC 2018


Author: des
Date: Sat May 12 17:04:40 2018
New Revision: 333572
URL: https://svnweb.freebsd.org/changeset/base/333572

Log:
  Support If-Modified-Since for https as well as http.
  
  PR:		224426
  Submitted by:	zsnafzig at edu.uwaterloo.ca
  MFC after:	1 week

Modified:
  head/usr.bin/fetch/fetch.c

Modified: head/usr.bin/fetch/fetch.c
==============================================================================
--- head/usr.bin/fetch/fetch.c	Sat May 12 17:02:27 2018	(r333571)
+++ head/usr.bin/fetch/fetch.c	Sat May 12 17:04:40 2018	(r333572)
@@ -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;


More information about the svn-src-head mailing list