Although retrieve_tree() stores and retrieves referring URLs in the
URL queue, it does not pass them to retrieve_url(). This seems to
have got lost during the transition from depth-first to breadth-
first retrieval.
This means that HTTP requests for URLs being retrieved at depth
greater than 0 have the Referer set to that set by the --referer
option or nothing at all, and not necessarily the URL of the
referring page.
src/ChangeLog entry:
2001-12-18 Ian Abbott <[EMAIL PROTECTED]>
* recur.c (retrieve_tree): Pass on referring URL when retrieving
recursed URL.
Index: src/recur.c
===================================================================
RCS file: /pack/anoncvs/wget/src/recur.c,v
retrieving revision 1.37
diff -u -r1.37 recur.c
--- src/recur.c 2001/12/13 19:18:31 1.37
+++ src/recur.c 2001/12/18 13:28:58
@@ -237,7 +237,7 @@
int oldrec = opt.recursive;
opt.recursive = 0;
- status = retrieve_url (url, &file, &redirected, NULL, &dt);
+ status = retrieve_url (url, &file, &redirected, referer, &dt);
opt.recursive = oldrec;
if (file && status == RETROK