[w3m-dev 03057] Re: Bug#134350: w3m: Forgets (http auth) login information upon reload (or almost anything else)

* etc.c (find_auth): add `file'
		check file as well
* etc.c (find_auth_cookie): add `file'
* etc.c (add_auth_cookie): add `file'
* file.c (AuthBasicCred): add "Basic "
* file.c (AuthDigestCred): add "Digest "
* file.c (getAuthCookie): if h_auth == NULL, get recorded cookie
* file.c (get_auth_cookie): get recorded cookie
* file.c (loadGeneralFile): don't clear add_auth_cookie_flag
			by redirection
	add_auth_cookie if authorization is required and passed
* fm.h (auth_cookie): add file
* ftp.c (openFTP): follow change auth_cookie
* proto.h (get_auth_cookie): added
* proto.h (find_auth_cookie): add `file'
* proto.h (add_auth_cookie): add `file'
* url.c (openURL): get_auth_cookie
From: Fumitoshi UKAI  <ukai@debian.or.jp>
This commit is contained in:
Fumitoshi UKAI
2002-02-19 15:50:17 +00:00
parent 8ebc9bc1fb
commit afbe346d3c
7 changed files with 77 additions and 27 deletions

6
ftp.c
View File

@@ -1,4 +1,4 @@
/* $Id: ftp.c,v 1.10 2002/01/11 20:05:58 ukai Exp $ */
/* $Id: ftp.c,v 1.11 2002/02/19 15:50:18 ukai Exp $ */
#include <stdio.h>
#include <pwd.h>
#include <Str.h>
@@ -411,7 +411,7 @@ openFTP(ParsedURL *pu)
if (pu->pass)
pass = pu->pass;
else if (pu->user) {
pwd = find_auth_cookie(pu->host, pu->port, pu->user);
pwd = find_auth_cookie(pu->host, pu->port, pu->file, pu->user);
if (pwd == NULL) {
if (fmInitialized) {
term_raw();
@@ -441,7 +441,7 @@ openFTP(ParsedURL *pu)
if (FtpError(s))
return NULL;
if (add_auth_cookie_flag)
add_auth_cookie(pu->host, pu->port, pu->user, pwd);
add_auth_cookie(pu->host, pu->port, pu->file, pu->user, pwd);
if (pu->file == NULL || *pu->file == '\0')
goto ftp_dir;
else