aboutsummaryrefslogtreecommitdiffstats
path: root/url.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-11-14 16:56:22 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-11-14 16:56:22 +0000
commit41139c1337fa36166ad60d4fa6bfb4709007d99f (patch)
tree56ee8149a209ac5ad47072a4a661b6df8934c7bb /url.c
parent[w3m-dev 03428] install manual as w3m.exe.1 on Cygwin (diff)
downloadw3m-41139c1337fa36166ad60d4fa6bfb4709007d99f.tar.gz
w3m-41139c1337fa36166ad60d4fa6bfb4709007d99f.zip
[w3m-dev 03429] https proxy
* fm.h (HTTPS_proxy): added (HTTPS_proxy_parsed): added * main.c (main): check https_proxy * rc.c (CMT_HTTPS_PROXY): added (https_proxy): added (parse_proxy): HTTPS_proxy * url.c (openURL): for HTTPS, use HTTPS_proxy (schemeToProxy): HTTPS_proxy_parsed From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r--url.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/url.c b/url.c
index 3c1c283..b07a330 100644
--- a/url.c
+++ b/url.c
@@ -1,4 +1,4 @@
-/* $Id: url.c,v 1.55 2002/11/06 15:03:26 ukai Exp $ */
+/* $Id: url.c,v 1.56 2002/11/14 16:56:24 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -1600,8 +1600,11 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
hr->command = HR_COMMAND_POST;
if (request && request->method == FORM_METHOD_HEAD)
hr->command = HR_COMMAND_HEAD;
- if (non_null(HTTP_proxy) &&
- !Do_not_use_proxy &&
+ if ((
+#ifdef USE_SSL
+ (pu->scheme == SCM_HTTPS) ? non_null(HTTPS_proxy) :
+#endif /* USE_SSL */
+ non_null(HTTP_proxy)) && !Do_not_use_proxy &&
pu->host != NULL && !check_no_proxy(pu->host)) {
char *save_label;
hr->flag |= HR_FLAG_PROXY;
@@ -1614,17 +1617,21 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
return uf;
}
}
+ else if (pu->scheme == SCM_HTTPS) {
+ sock = openSocket(HTTPS_proxy_parsed.host,
+ schemetable[HTTPS_proxy_parsed.scheme].
+ cmdname, HTTPS_proxy_parsed.port);
+ sslh = NULL;
+ }
else {
+#endif /* USE_SSL */
sock = openSocket(HTTP_proxy_parsed.host,
schemetable[HTTP_proxy_parsed.scheme].
cmdname, HTTP_proxy_parsed.port);
+#ifdef USE_SSL
sslh = NULL;
}
-#else
- sock = openSocket(HTTP_proxy_parsed.host,
- schemetable[HTTP_proxy_parsed.scheme].cmdname,
- HTTP_proxy_parsed.port);
-#endif
+#endif /* USE_SSL */
if (sock < 0) {
#ifdef SOCK_DEBUG
sock_log("Can't open socket\n");
@@ -2229,11 +2236,13 @@ schemeToProxy(int scheme)
ParsedURL *pu = NULL; /* for gcc */
switch (scheme) {
case SCM_HTTP:
+ pu = &HTTP_proxy_parsed;
+ break;
#ifdef USE_SSL
case SCM_HTTPS:
-#endif
- pu = &HTTP_proxy_parsed;
+ pu = &HTTPS_proxy_parsed;
break;
+#endif
case SCM_FTP:
pu = &FTP_proxy_parsed;
break;