[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Wget-dev] wget2 | Fix for -p -nc Bug (!416)
From: |
Tim Rühsen |
Subject: |
Re: [Wget-dev] wget2 | Fix for -p -nc Bug (!416) |
Date: |
Fri, 22 Mar 2019 14:32:37 +0000 |
Tim Rühsen commented on a discussion on tests/test-p-nc.c:
> + { urls[14].name + 1, urls[14].body }, // import1.css
> + { urls[15].name + 1, urls[15].body }, // import2.css
> + { urls[16].name + 1, urls[16].body }, // background.css
> + { NULL } },
> + 0);
> +
> + // test-p-nc (with existing files)
> + wget_test(
> + WGET_TEST_OPTIONS, "-p -nc -nH",
> + WGET_TEST_REQUEST_URL, "index.html",
> + WGET_TEST_EXPECTED_ERROR_CODE, 0,
> + WGET_TEST_EXISTING_FILES, &(wget_test_file_t []) {
> + { urls[0].name + 1, modified_index_html },
> + { urls[4].name + 1, "modified image" },
> + { NULL } },
> + WGET_TEST_EXPECTED_FILES, &(wget_test_file_t []) {
It tests that
- an existing file is neither overwritten (server does not indicate newer data)
nor does -nc create a .1 file
- an existing HTML file is being parsed
I just think of another small test case where the existing index.html becomes
overwritten. For this, the server must send a 200 OK with a newer timestamp.
It's basically test 1 with an existing index.html with 'modified_index_html'.
Maybe the easiest is to add 'Last-Modified:' header to urls[0].headers[1]
(index.html) and set the unix timestamp for the existing file to something
older. @ojhaarjun1 WDYT ?
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/wget2/merge_requests/416#note_153304215
You're receiving this email because of your account on gitlab.com.
- Re: [Wget-dev] wget2 | Fix for -p -nc Bug (!416), (continued)
- Message not available
- Message not available
Re: [Wget-dev] wget2 | Fix for -p -nc Bug (!416), Kumar Mallikarjuna, 2019/03/22
Message not available
Message not available
Message not available
Re: [Wget-dev] wget2 | Fix for -p -nc Bug (!416), Kumar Mallikarjuna, 2019/03/22
Message not available