*** doc/wget.info.orig 2010-09-27 20:12:08.000000000 -0400 --- doc/wget.info 2010-09-27 20:03:09.000000000 -0400 *************** *** 1689,1694 **** --- 1689,1701 ---- ACCLIST or REJLIST, it will be treated as a pattern, rather than a suffix. + `--match-query-string' + Uses the query string when matching against file name suffixes + or patterns. (The query string is the data after the question mark + in a URL.) Note that the wildcard B is still considered a + wildcard and using it will treat the accept/reject list as a + pattern. + `-D DOMAIN-LIST' `--domains=DOMAIN-LIST' Set domains to be followed. DOMAIN-LIST is a comma-separated list *************** *** 2007,2016 **** future versions of Wget. Note, too, that query strings (strings at the end of a URL beginning ! with a question mark (`?') are not included as part of the filename for ! accept/reject rules, even though these will actually contribute to the ! name chosen for the local file. It is expected that a future version of ! Wget will provide an option to allow matching against query strings. Finally, it's worth noting that the accept/reject lists are matched _twice_ against downloaded files: once against the URL's filename --- 2014,2023 ---- future versions of Wget. Note, too, that query strings (strings at the end of a URL beginning ! with a question mark `?') are not included as part of the filename for ! accept/reject rules by default, even though these will actually ! contribute to the name chosen for the local file. The option ! `--match-query-string' changes this behavior. Finally, it's worth noting that the accept/reject lists are matched _twice_ against downloaded files: once against the URL's filename *************** *** 2034,2041 **** download will be named `index.php.html', which no longer matches, and so the file will be deleted. ! * Query strings do not contribute to URL matching, but are included ! in local filenames, and so _do_ contribute to filename matching. This behavior, too, is considered less-than-desirable, and may change in a future version of Wget. --- 2041,2049 ---- download will be named `index.php.html', which no longer matches, and so the file will be deleted. ! * Query strings do not contribute to URL matching (unless ! specified), but are included in local filenames, and so _do_ ! contribute to filename matching. This behavior, too, is considered less-than-desirable, and may change in a future version of Wget. *** doc/wget.pod.orig 2010-09-27 19:32:56.000000000 -0400 --- doc/wget.pod 2010-09-27 19:55:10.000000000 -0400 *************** *** 1844,1849 **** --- 1844,1858 ---- it will be treated as a pattern, rather than a suffix. + =item B<--match-query-string> + + Uses the query string when matching against file name suffixes + or patterns. (The query string is the data after the question mark + in a URL.) Note that the wildcard B is still considered a + wildcard and using it will treat the accept/reject list as a + pattern. + + =item B<-D> I *** src/init.c.orig 2010-09-27 19:16:34.000000000 -0400 --- src/init.c 2010-09-27 19:17:34.000000000 -0400 *************** *** 188,193 **** --- 188,194 ---- { "localencoding", &opt.locale, cmd_string }, { "logfile", &opt.lfilename, cmd_file }, { "login", &opt.ftp_user, cmd_string },/* deprecated*/ + { "matchquerystring", &opt.match_query_string, cmd_boolean }, { "maxredirect", &opt.max_redirect, cmd_number }, { "mirror", NULL, cmd_spec_mirror }, { "netrc", &opt.netrc, cmd_boolean }, *** src/main.c.orig 2010-09-27 19:14:47.000000000 -0400 --- src/main.c 2010-09-27 19:45:32.000000000 -0400 *************** *** 218,223 **** --- 218,224 ---- { "limit-rate", 0, OPT_VALUE, "limitrate", -1 }, { "load-cookies", 0, OPT_VALUE, "loadcookies", -1 }, { "local-encoding", 0, OPT_VALUE, "localencoding", -1 }, + { "match-query-string", 0, OPT_BOOLEAN, "matchquerystring", -1 }, { "max-redirect", 0, OPT_VALUE, "maxredirect", -1 }, { "mirror", 'm', OPT_BOOLEAN, "mirror", -1 }, { "no", 'n', OPT__NO, NULL, required_argument }, *************** *** 659,664 **** --- 660,668 ---- N_("\ -R, --reject=LIST comma-separated list of rejected extensions.\n"), N_("\ + --match-query-string use query strings when matching accept/reject\n\ + extensions.\n"), + N_("\ -D, --domains=LIST comma-separated list of accepted domains.\n"), N_("\ --exclude-domains=LIST comma-separated list of rejected domains.\n"), *** src/options.h.orig 2010-09-27 19:31:30.000000000 -0400 --- src/options.h 2010-09-27 19:30:38.000000000 -0400 *************** *** 237,242 **** --- 237,243 ---- bool content_disposition; /* Honor HTTP Content-Disposition header. */ bool auth_without_challenge; /* Issue Basic authentication creds without waiting for a challenge. */ + bool match_query_string; /* Use query strings in accept/reject matching */ bool enable_iri; char *encoding_remote; *** src/recur.c.orig 2010-08-08 09:11:34.000000000 -0400 --- src/recur.c 2010-09-27 19:27:48.000000000 -0400 *************** *** 605,614 **** /* -p, which implies non-leaf (see above) */ || opt.page_requisites))) { ! if (!acceptable (u->file)) { DEBUGP (("%s (%s) does not match acc/rej rules.\n", ! url, u->file)); goto out; } } --- 605,617 ---- /* -p, which implies non-leaf (see above) */ || opt.page_requisites))) { ! char *full_file = u->file; ! if (opt.match_query_string) full_file = concat_strings(u->file, "?", u->query, (char *) 0); ! ! if (!acceptable (full_file)) { DEBUGP (("%s (%s) does not match acc/rej rules.\n", ! url, full_file)); goto out; } }