wget-dev
[Top][All Lists]
Advanced

[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: Wed, 27 Mar 2019 15:56:08 +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 []) {

>From 'man wget':
```
          When running Wget with -r or -p, but without -N, -nd, or -nc, 
re-downloading a file will result in the new copy simply
           overwriting the old.  Adding -nc will prevent this behavior, instead 
causing the original version to be preserved and any
           newer copies on the server to be ignored.

           When running Wget with -N, with or without -r or -p, the decision as 
to whether or not to download a newer copy of a file
           depends on the local and remote timestamp and size of the file.  -nc 
may not be specified at the same time as -N.
```

So maybe we even need more tests (all combinations of -N, -r and -nc). At least 
we should follow the documented wget1.x behavior for backwards compatibility.

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/merge_requests/416#note_154756004
You're receiving this email because of your account on gitlab.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]