w3m

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

commit 4609aeff08633b1c9cb94e243e336bbc6745c8b2
parent 957320fb420a88e124e9ce16a87ba79b4e75e191
Author: ukai <ukai>
Date:   Wed, 30 Oct 2002 15:39:41 +0000

[w3m-dev 03359] support for http://user:pass@www.url.com
* etc.c (find_auth_user_passwd): use ParsedURL for args
	use user and passwd if these are defined in ParsedURL
* file.c (getAuthCookie): change find_auth_user_passwd()
* proto.h (find_auth_user_passwd): change prototype
From: Fumitoshi UKAI  <ukai@debian.or.jp>

Diffstat:
MChangeLog | 8++++++++
Metc.c | 10++++++++--
Mfile.c | 3+--
Mproto.h | 2+-
4 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,11 @@ +2002-10-31 Fumitoshi UKAI <ukai@debian.or.jp> + + * [w3m-dev 03359] support for http://user:pass@www.url.com + * etc.c (find_auth_user_passwd): use ParsedURL for args + use user and passwd if these are defined in ParsedURL + * file.c (getAuthCookie): change find_auth_user_passwd() + * proto.h (find_auth_user_passwd): change prototype + 2002-10-30 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> * [w3m-dev 03357] tab in <pre> in <ul>,<ol>,... diff --git a/etc.c b/etc.c @@ -891,11 +891,17 @@ find_auth_pass_entry(char *host, int port, char *file, char *realm, } int -find_auth_user_passwd(char *host, int port, char *file, char *realm, +find_auth_user_passwd(ParsedURL *pu, char *realm, Str *uname, Str *pwd, int is_proxy) { struct auth_pass *ent; - ent = find_auth_pass_entry(host, port, file, realm, is_proxy); + + if (pu->user && pu->pass) { + *uname = Strnew_charp(pu->user); + *pwd = Strnew_charp(pu->pass); + return 1; + } + ent = find_auth_pass_entry(pu->host, pu->port, pu->file, realm, is_proxy); if (ent) { *uname = ent->uname; *pwd = ent->pwd; diff --git a/file.c b/file.c @@ -1390,8 +1390,7 @@ getAuthCookie(struct http_auth *hauth, char *auth_header, auth_header_len); if (!a_found && - find_auth_user_passwd(pu->host, pu->port, pu->file, realm, - &uname, &pwd, proxy)) { + find_auth_user_passwd(pu, realm, &uname, &pwd, proxy)) { /* found username & password in passwd file */ ; } else { diff --git a/proto.h b/proto.h @@ -521,7 +521,7 @@ extern void set_environ(char *var, char *value); extern FILE *localcgi_post(char *, char *, FormList *, char *); extern FILE *localcgi_get(char *, char *, char *); extern void loadPasswd(void); -extern int find_auth_user_passwd(char *host, int port, char *file, char *realm, +extern int find_auth_user_passwd(ParsedURL *pu, char *realm, Str *uname, Str *pwd, int is_proxy); extern Str find_auth_cookie(char *host, int port, char *file, char *realm); extern void add_auth_cookie(char *host, int port, char *file, char *realm,