|
@@ -1,132 +0,0 @@
|
1
|
|
-From 1cb3af1e5b392ac2fae6d9ed8b5d7be399d9f37e Mon Sep 17 00:00:00 2001
|
2
|
|
-From: Ygal Blum <address@hidden>
|
3
|
|
-Date: Tue, 24 Nov 2015 11:24:54 +0200
|
4
|
|
-Subject: [PATCH] Fix compilation when without-ssl is selected
|
5
|
|
-
|
6
|
|
----
|
7
|
|
- src/ftp.c | 2 ++
|
8
|
|
- src/main.c | 12 ++++++++++--
|
9
|
|
- src/recur.c | 6 +++++-
|
10
|
|
- src/retr.c | 18 +++++++++++++++---
|
11
|
|
- src/url.c | 6 +++++-
|
12
|
|
- 5 files changed, 37 insertions(+), 7 deletions(-)
|
13
|
|
-
|
14
|
|
-diff --git a/src/ftp.c b/src/ftp.c
|
15
|
|
-index 80420ef..5394b71 100644
|
16
|
|
---- a/src/ftp.c
|
17
|
|
-+++ b/src/ftp.c
|
18
|
|
-@@ -393,7 +393,9 @@ getftp (struct url *u, wgint passed_expected_bytes, wgint *qtyread,
|
19
|
|
- if (!(cmd & DO_LOGIN))
|
20
|
|
- {
|
21
|
|
- csock = con->csock;
|
22
|
|
-+#ifdef HAVE_SSL
|
23
|
|
- using_data_security = con->st & DATA_CHANNEL_SECURITY;
|
24
|
|
-+#endif
|
25
|
|
- }
|
26
|
|
- else /* cmd & DO_LOGIN */
|
27
|
|
- {
|
28
|
|
-diff --git a/src/main.c b/src/main.c
|
29
|
|
-index 61a157a..4641008 100644
|
30
|
|
---- a/src/main.c
|
31
|
|
-+++ b/src/main.c
|
32
|
|
-@@ -1842,13 +1842,21 @@ only if outputting to a regular file.\n"));
|
33
|
|
- else
|
34
|
|
- {
|
35
|
|
- if ((opt.recursive || opt.page_requisites)
|
36
|
|
-- && ((url_scheme (*t) != SCHEME_FTP && url_scheme (*t) != SCHEME_FTPS)
|
37
|
|
-+ && ((url_scheme (*t) != SCHEME_FTP
|
38
|
|
-+#ifdef HAVE_SSL
|
39
|
|
-+ && url_scheme (*t) != SCHEME_FTPS
|
40
|
|
-+#endif
|
41
|
|
-+ )
|
42
|
|
- || url_uses_proxy (url_parsed)))
|
43
|
|
- {
|
44
|
|
- int old_follow_ftp = opt.follow_ftp;
|
45
|
|
-
|
46
|
|
- /* Turn opt.follow_ftp on in case of recursive FTP retrieval */
|
47
|
|
-- if (url_scheme (*t) == SCHEME_FTP || url_scheme (*t) == SCHEME_FTPS)
|
48
|
|
-+ if (url_scheme (*t) == SCHEME_FTP
|
49
|
|
-+#ifdef HAVE_SSL
|
50
|
|
-+ || url_scheme (*t) == SCHEME_FTPS
|
51
|
|
-+#endif
|
52
|
|
-+ )
|
53
|
|
- opt.follow_ftp = 1;
|
54
|
|
-
|
55
|
|
- retrieve_tree (url_parsed, NULL);
|
56
|
|
-diff --git a/src/recur.c b/src/recur.c
|
57
|
|
-index 25cdbb7..b212ec6 100644
|
58
|
|
---- a/src/recur.c
|
59
|
|
-+++ b/src/recur.c
|
60
|
|
-@@ -610,7 +610,11 @@ download_child (const struct urlpos *upos, struct url *parent, int depth,
|
61
|
|
- u_scheme_like_http = schemes_are_similar_p (u->scheme, SCHEME_HTTP);
|
62
|
|
-
|
63
|
|
- /* 1. Schemes other than HTTP are normally not recursed into. */
|
64
|
|
-- if (!u_scheme_like_http && !((u->scheme == SCHEME_FTP || u->scheme == SCHEME_FTPS) && opt.follow_ftp))
|
65
|
|
-+ if (!u_scheme_like_http && !((u->scheme == SCHEME_FTP
|
66
|
|
-+#ifdef HAVE_SSL
|
67
|
|
-+ || u->scheme == SCHEME_FTPS
|
68
|
|
-+#endif
|
69
|
|
-+ ) && opt.follow_ftp))
|
70
|
|
- {
|
71
|
|
- DEBUGP (("Not following non-HTTP schemes.\n"));
|
72
|
|
- reason = WG_RR_NONHTTP;
|
73
|
|
-diff --git a/src/retr.c b/src/retr.c
|
74
|
|
-index 318b09c..a6a9bd7 100644
|
75
|
|
---- a/src/retr.c
|
76
|
|
-+++ b/src/retr.c
|
77
|
|
-@@ -837,7 +837,11 @@ retrieve_url (struct url * orig_parsed, const char *origurl, char **file,
|
78
|
|
- FTP. In these cases we must decide whether the text is HTML
|
79
|
|
- according to the suffix. The HTML suffixes are `.html',
|
80
|
|
- `.htm' and a few others, case-insensitive. */
|
81
|
|
-- if (redirection_count && local_file && (u->scheme == SCHEME_FTP || u->scheme == SCHEME_FTPS))
|
82
|
|
-+ if (redirection_count && local_file && (u->scheme == SCHEME_FTP
|
83
|
|
-+#ifdef HAVE_SSL
|
84
|
|
-+ || u->scheme == SCHEME_FTPS
|
85
|
|
-+#endif
|
86
|
|
-+ ))
|
87
|
|
- {
|
88
|
|
- if (has_html_suffix_p (local_file))
|
89
|
|
- *dt |= TEXTHTML;
|
90
|
|
-@@ -1099,12 +1103,20 @@ retrieve_from_file (const char *file, bool html, int *count)
|
91
|
|
-
|
92
|
|
- proxy = getproxy (cur_url->url);
|
93
|
|
- if ((opt.recursive || opt.page_requisites)
|
94
|
|
-- && ((cur_url->url->scheme != SCHEME_FTP && cur_url->url->scheme != SCHEME_FTPS) || proxy))
|
95
|
|
-+ && ((cur_url->url->scheme != SCHEME_FTP
|
96
|
|
-+#ifdef HAVE_SSL
|
97
|
|
-+ && cur_url->url->scheme != SCHEME_FTPS
|
98
|
|
-+#endif
|
99
|
|
-+ ) || proxy))
|
100
|
|
- {
|
101
|
|
- int old_follow_ftp = opt.follow_ftp;
|
102
|
|
-
|
103
|
|
- /* Turn opt.follow_ftp on in case of recursive FTP retrieval */
|
104
|
|
-- if (cur_url->url->scheme == SCHEME_FTP || cur_url->url->scheme == SCHEME_FTPS)
|
105
|
|
-+ if (cur_url->url->scheme == SCHEME_FTP
|
106
|
|
-+#ifdef HAVE_SSL
|
107
|
|
-+ || cur_url->url->scheme == SCHEME_FTPS
|
108
|
|
-+#endif
|
109
|
|
-+ )
|
110
|
|
- opt.follow_ftp = 1;
|
111
|
|
-
|
112
|
|
- status = retrieve_tree (parsed_url ? parsed_url : cur_url->url,
|
113
|
|
-diff --git a/src/url.c b/src/url.c
|
114
|
|
-index 56079cd..c62867f 100644
|
115
|
|
---- a/src/url.c
|
116
|
|
-+++ b/src/url.c
|
117
|
|
-@@ -1787,7 +1787,11 @@ path_simplify (enum url_scheme scheme, char *path)
|
118
|
|
- for (--t; t > beg && t[-1] != '/'; t--)
|
119
|
|
- ;
|
120
|
|
- }
|
121
|
|
-- else if (scheme == SCHEME_FTP || scheme == SCHEME_FTPS)
|
122
|
|
-+ else if (scheme == SCHEME_FTP
|
123
|
|
-+#ifdef HAVE_SSL
|
124
|
|
-+ || scheme == SCHEME_FTPS
|
125
|
|
-+#endif
|
126
|
|
-+ )
|
127
|
|
- {
|
128
|
|
- /* If we're at the beginning, copy the "../" literally
|
129
|
|
- and move the beginning so a later ".." doesn't remove
|
130
|
|
-1.9.1
|
131
|
|
-
|