Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174209194
D28437.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28437.diff
View Options
Index: lib/libfetch/common.h
===================================================================
--- lib/libfetch/common.h
+++ lib/libfetch/common.h
@@ -168,6 +168,7 @@
const char *, const char *);
FILE *ftp_request(struct url *, const char *,
struct url_stat *, struct url *, const char *);
+struct url *ftp_get_proxy(struct url *, const char *);
/*
* Check whether a particular flag is set
Index: lib/libfetch/ftp.c
===================================================================
--- lib/libfetch/ftp.c
+++ lib/libfetch/ftp.c
@@ -1064,7 +1064,7 @@
/*
* Check the proxy settings
*/
-static struct url *
+struct url *
ftp_get_proxy(struct url * url, const char *flags)
{
struct url *purl;
Index: lib/libfetch/http.c
===================================================================
--- lib/libfetch/http.c
+++ lib/libfetch/http.c
@@ -1952,6 +1952,15 @@
if (url != URL)
fetchFreeURL(url);
url = new;
+ if (!direct) {
+ if (purl)
+ fetchFreeURL(purl);
+ if (strcmp(url->scheme, SCHEME_FTP) == 0)
+ purl = ftp_get_proxy(url, flags);
+ else if (strcmp(url->scheme, SCHEME_HTTP) == 0
+ || strcmp(url->scheme, SCHEME_HTTPS) == 0)
+ purl = http_get_proxy(url, flags);
+ }
} while (++i < n);
/* we failed, or ran out of retries */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 2, 9:27 AM (17 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40074649
Default Alt Text
D28437.diff (1 KB)
Attached To
Mode
D28437: fetch(3): Fix wrong usage of proxy when request is redirected to different URL
Attached
Detach File
Event Timeline
Log In to Comment