w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit f75af31c81e927e41807381694f3ed77513a394e
parent b71cb643847cafa6efbe9daa15c19592e7bbaa43
Author: ukai <ukai>
Date:   Mon,  3 Dec 2001 18:29:37 +0000

[w3m-dev 02611] a improvement of find_cookie()
From: Tsutomu Okada <okada@furuno.co.jp>

Diffstat:
MChangeLog | 8++++++++
Mcookie.c | 9+++++----
Mfunc.c | 6++----
Mlocal.c | 4+---
4 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,5 +1,13 @@ 2001-12-04 Tsutomu Okada <okada@furuno.co.jp> + * [w3m-dev 02611] a improvement of find_cookie() + * cookie.c (make_cookie): domainname is passed as argument + * cookie.c (find_cookie): FQDN(pu->host) done only once + * func.c (getQWord): comment reformat + * local.c (check_local_cgi): ditto + +2001-12-04 Tsutomu Okada <okada@furuno.co.jp> + * [w3m-dev 02609] * proto.h: remove duplicate prototypes diff --git a/cookie.c b/cookie.c @@ -161,10 +161,8 @@ make_cookie(struct cookie *cookie) } static int -match_cookie(ParsedURL *pu, struct cookie *cookie) +match_cookie(ParsedURL *pu, struct cookie *cookie, char *domainname) { - char *domainname = (cookie->version == 0) ? FQDN(pu->host) : pu->host; - if (!domainname) return 0; @@ -204,10 +202,13 @@ find_cookie(ParsedURL *pu) Str tmp; struct cookie *p, *p1, *fco = NULL; int version = 0; + char *fq_domainname, *domainname; + fq_domainname = FQDN(pu->host); check_expired_cookies(); for (p = First_cookie; p; p = p->next) { - if (p->flag & COO_USE && match_cookie(pu, p)) { + domainname = (p->version == 0) ? fq_domainname : pu->host; + if (p->flag & COO_USE && match_cookie(pu, p, domainname)) { for (p1 = fco; p1 && Strcasecmp(p1->name, p->name); p1 = p1->next) ; if (p1) diff --git a/func.c b/func.c @@ -322,10 +322,8 @@ getQWord(char **str) *e++ = '\\'; } else { - if (*p != '\\' && *p != '\'' && /* ..\\.., * - * ..\'.. */ - *p != '"' && !IS_SPACE(*p)) /* ..\".., * ..\.. - */ + if (*p != '\\' && *p != '\'' && /* ..\\.., ..\'.. */ + *p != '"' && !IS_SPACE(*p)) /* ..\".., ..\.. */ *e++ = '\\'; } *e++ = *p; diff --git a/local.c b/local.c @@ -173,9 +173,7 @@ check_local_cgi(char *file, int status) char tmp[_MAX_PATH]; int len; - _abspath(tmp, w3m_lib_dir(), _MAX_PATH); /* Translate '\\' to '/' - * - */ + _abspath(tmp, w3m_lib_dir(), _MAX_PATH); /* Translate '\\' to '/' */ len = strlen(tmp); while (len > 1 && tmp[len - 1] == '/') len--;