1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

"Now we can send a request with `Referer:' by setting the environment

variable `referer' as well as `http_proxy'."

Submitted by:	shige
This commit is contained in:
David E. O'Brien 2000-02-12 18:00:49 +00:00
parent 7ce73b5ab7
commit 2ed3b81778
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=25694
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,21 @@
--- src/retr.c.orig Wed Feb 9 00:18:45 2000
+++ src/retr.c Wed Feb 9 00:18:51 2000
@@ -445,7 +445,7 @@
recursive_reset ();
for (cur_url = url_list; cur_url; cur_url = cur_url->next, ++*count)
{
- char *filename, *new_file;
+ char *filename, *new_file, *referer;
int dt;
if (opt.quota && opt.downloaded > opt.quota)
@@ -453,7 +453,8 @@
status = QUOTEXC;
break;
}
- status = retrieve_url (cur_url->url, &filename, &new_file, NULL, &dt);
+ referer = getenv("referer");
+ status = retrieve_url (cur_url->url, &filename, &new_file, referer, &dt);
if (opt.recursive && status == RETROK && (dt & TEXTHTML))
status = recursive_retrieve (filename, new_file ? new_file : cur_url->url);

View File

@ -0,0 +1,21 @@
--- src/retr.c.orig Wed Feb 9 00:18:45 2000
+++ src/retr.c Wed Feb 9 00:18:51 2000
@@ -445,7 +445,7 @@
recursive_reset ();
for (cur_url = url_list; cur_url; cur_url = cur_url->next, ++*count)
{
- char *filename, *new_file;
+ char *filename, *new_file, *referer;
int dt;
if (opt.quota && opt.downloaded > opt.quota)
@@ -453,7 +453,8 @@
status = QUOTEXC;
break;
}
- status = retrieve_url (cur_url->url, &filename, &new_file, NULL, &dt);
+ referer = getenv("referer");
+ status = retrieve_url (cur_url->url, &filename, &new_file, referer, &dt);
if (opt.recursive && status == RETROK && (dt & TEXTHTML))
status = recursive_retrieve (filename, new_file ? new_file : cur_url->url);