diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-06-17 18:02:41 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-06-17 18:02:41 +0000 |
commit | 228e3a7915d5c5b45a85c60e2e5b2b3d29666a39 (patch) | |
tree | e26f0414c54b5e5de56b8b56c4c1a36797992ac2 | |
parent | fix indent (diff) | |
download | w3m-228e3a7915d5c5b45a85c60e2e5b2b3d29666a39.tar.gz w3m-228e3a7915d5c5b45a85c60e2e5b2b3d29666a39.zip |
[w3m-dev 03914] a fragment in the Referer URI
* url.c (otherinfo): strip URI fragment
From: ABE Yuji <cbo46560@pop12.odn.ne.jp>
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | url.c | 11 |
2 files changed, 15 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2003-06-18 ABE Yuji <cbo46560@pop12.odn.ne.jp> + + * [w3m-dev 03914] a fragment in the Referer URI + * url.c (otherinfo): strip URI fragment + 2003-06-13 Hiroyuki Ito <hito@crl.go.jp> * [w3m-dev 03913] fix gif animation support @@ -7850,4 +7855,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.841 2003/06/13 15:03:02 ukai Exp $ +$Id: ChangeLog,v 1.842 2003/06/17 18:02:41 ukai Exp $ @@ -1,4 +1,4 @@ -/* $Id: url.c,v 1.79 2003/05/10 18:20:29 ukai Exp $ */ +/* $Id: url.c,v 1.80 2003/06/17 18:02:41 ukai Exp $ */ #include "fm.h" #include <sys/types.h> #include <sys/socket.h> @@ -1279,13 +1279,20 @@ otherinfo(ParsedURL *target, ParsedURL *current, char *referer) if (referer == NULL && current && current->scheme != SCM_LOCAL && (current->scheme != SCM_FTP || (current->user == NULL && current->pass == NULL))) { + char *p = current->label; Strcat_charp(s, "Referer: "); + current->label = NULL; Strcat(s, parsedURL2Str(current)); + current->label = p; Strcat_charp(s, "\r\n"); } else if (referer != NULL && referer != NO_REFERER) { + char *p = strchr(referer, '#'); Strcat_charp(s, "Referer: "); - Strcat_charp(s, referer); + if (p) + Strcat_charp_n(s, referer, p - referer); + else + Strcat_charp(s, referer); Strcat_charp(s, "\r\n"); } } |