aboutsummaryrefslogtreecommitdiffstats
path: root/url.c
diff options
context:
space:
mode:
authorIto Hiroyuki <ZXB01226@nifty.com>2010-12-11 13:00:11 +0000
committerIto Hiroyuki <ZXB01226@nifty.com>2010-12-11 13:00:11 +0000
commitb2c5167d2ac5522d66404a077bba24fdbc59908f (patch)
treec31ad76e487b445afc7618d1153c846dac6fb992 /url.c
parent* [w3m-dev 04414] Re: "normal" bugs from bugs.debian.org (diff)
downloadw3m-b2c5167d2ac5522d66404a077bba24fdbc59908f.tar.gz
w3m-b2c5167d2ac5522d66404a077bba24fdbc59908f.zip
[w3m-dev 04421] Patch to prevent sending Referer: ' header from HTTPS to HTTP
Diffstat (limited to '')
-rw-r--r--url.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/url.c b/url.c
index 1973795..ac82082 100644
--- a/url.c
+++ b/url.c
@@ -1,4 +1,4 @@
-/* $Id: url.c,v 1.98 2010/08/03 10:02:16 htrb Exp $ */
+/* $Id: url.c,v 1.99 2010/12/11 13:00:11 htrb Exp $ */
#include "fm.h"
#ifndef __MINGW32_VERSION
#include <sys/types.h>
@@ -1307,6 +1307,12 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer)
Strcat_charp(s, "Cache-control: no-cache\r\n");
}
if (!NoSendReferer) {
+#ifdef USE_SSL
+ if (current && current->scheme == SCM_HTTPS && target->scheme != SCM_HTTPS) {
+ /* Don't send Referer: if https:// -> http:// */
+ }
+ else
+#endif
if (referer == NULL && current && current->scheme != SCM_LOCAL &&
(current->scheme != SCM_FTP ||
(current->user == NULL && current->pass == NULL))) {