diff options
author | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-12-11 13:00:11 +0000 |
---|---|---|
committer | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-12-11 13:00:11 +0000 |
commit | b2c5167d2ac5522d66404a077bba24fdbc59908f (patch) | |
tree | c31ad76e487b445afc7618d1153c846dac6fb992 /url.c | |
parent | * [w3m-dev 04414] Re: "normal" bugs from bugs.debian.org (diff) | |
download | w3m-b2c5167d2ac5522d66404a077bba24fdbc59908f.tar.gz w3m-b2c5167d2ac5522d66404a077bba24fdbc59908f.zip |
[w3m-dev 04421] Patch to prevent sending Referer: ' header from HTTPS to HTTP
Diffstat (limited to 'url.c')
-rw-r--r-- | url.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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))) { |