aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog7
-rw-r--r--url.c8
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a50349e..4c33a2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-11 theme.of.n@gmail.com
+
+ * [w3m-dev 04421] Patch to prevent sending `Referer: ' header from HTTPS to HTTP
+ * url.c (otherinfo): Don't send Referer: if https:// -> http://
+
2010-10-11 d+w3m@vdr.jp
* [w3m-dev 04414] Re: "normal" bugs from bugs.debian.org
@@ -9200,4 +9205,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.1039 2010/10/11 12:59:36 htrb Exp $
+$Id: ChangeLog,v 1.1040 2010/12/11 13:00:11 htrb Exp $
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))) {