commit b60abbce515fb04b9fbb34caaa351a35d2b63edb
parent 17230278d1ffbf89bc5fcbc36658e0445742876c
Author: htrb <htrb>
Date: Tue, 3 Aug 2010 10:02:16 +0000
* register user name and password for proxy authentication.
* remove option -pauth
Diffstat:
11 files changed, 64 insertions(+), 29 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-03 Ito Hiroyuki <ZXB01226@nifty.com>
+
+ * [w3m-dev 04343]
+ * file.c (loadGeneralFile): register user name and password for proxy authentication.
+ * url.c (HTTPrequest): unused variable seen_proxy_auth was removed
+ * fm.h: global variables proxy_auth_cookie and pauth are removed
+ * main.c (main): remove option -pauth
+ * doc/MANUAL.html: ditto
+ * doc-jp/MANUAL.html: ditto
+ * doc-jp/w3m.1: ditto
+ * doc/w3m.1: ditto
+ * doc/README.passwd: added
+ * doc-jp/README.passwd: added
+
2010-07-31 Tatsuya Kinoshita <tats@vega.ocn.ne.jp>
* [w3m-dev 04350] Re: w3m's bugs from bugs.debian.org
diff --git a/doc-jp/MANUAL.html b/doc-jp/MANUAL.html
@@ -100,8 +100,6 @@ HTML
オプションの名前や値は,~/.w3m/config で指定するものと同じ.
<dt>-no-proxy
<dd>プロキシを利用しない.
-<dt>-pauth user:pass
-<dd>プロキシ認証用のユーザ名とパスワードを指定する.
<dt>-no-mouse
<dd>マウスを利用しない.
<dt>-cookie
diff --git a/doc-jp/README.passwd b/doc-jp/README.passwd
@@ -0,0 +1,22 @@
+HTTP $BG'>Z$N$"$k%Z!<%8$dG'>Z$N$"$k(B proxy $B$KBP$7$F!"(B
+$B%f!<%6L>$H%Q%9%o!<%I$r@_Dj$7$F$*$/$3$H$,=PMh$^$9!#(B
+
+passwd_file $B$G;XDj$7$?%U%!%$%k$K<!$N$h$&$K=q$$$F$*$1$P$=$l$r8+$^$9!#(B
+
+machine $B%[%9%HL>(B
+port $B%]!<%HHV9f(B
+path $B%m!<%+%k%Q!<%H(B
+realm realm$B$NJ8;zNs(B
+login $B%f!<%6L>(B
+passwd $B%Q%9%o!<%I(B
+proxy
+
+machine$B$G$O$8$^$C$F<!$N(Bmachine$B$^$G!#(B
+netrc$B$.$_$G$9$,4JC1$K$9$k$?$a$K0l9T$E$D!#(B
+port, path, realm $B$O>JN,2DG=(B
+
+proxy $B$H=q$$$?>l9g$O(B proxy $B$N%Q%9%o!<%I$H$_$J$7$^$9!#(B
+
+passwd_file $B$,B>$N%f!<%6!<$+$iFI$a$k>l9g7Y9p$,=P$^$9$,!"(BOS $B$N@)8B$J$I$G(B
+$B%U%!%$%k$N%Q!<%_%C%7%g%s$rJQ$($i$l$J$$>l9g$O$3$N7Y9p$r(B
+disable_secret_security_check $B$N@_Dj$GL58z$K$G$-$^$9!#(B
diff --git a/doc-jp/w3m.1 b/doc-jp/w3m.1
@@ -103,9 +103,6 @@ Bookmark
.B \-no\-proxy
プロキシを利用しない.
.TP
-.BI \-pauth\ user:pass
-プロキシ認証用のユーザ名とパスワードを指定する.
-.TP
.B \-no\-mouse
マウスを利用しない.
.TP
diff --git a/doc/MANUAL.html b/doc/MANUAL.html
@@ -103,8 +103,6 @@ same as that appears in ~/.w3m/config.
<dd>Process cookies.
<dt>-no-cookie
<dd>Don't process cookies.
-<dt>-pauth username:password
-<dd>Set username and password for (basic) proxy authentication.
<dt>-num
<dd>Show linenumber.
<dt>-dump
diff --git a/doc/README.passwd b/doc/README.passwd
@@ -0,0 +1,23 @@
+You can save your passwords and usernames for a web page which require
+HTTP certification or a proxy certification.
+
+The configuration file is designated in "passwd_file" parameter. The
+format of the configuration file is as follows
+
+machine hostname
+port port number
+path local part
+realm realm string
+login username
+passwd password
+proxy
+
+Each configuration is began with machine and ended before the next machine.
+You can omit port, path and realm.
+
+proxy means settings for proxy certification.
+
+If passwd_file is readable from other users, w3m shows a warning for
+that. If you can not set the permission for the passwd_file because
+of the restriction of your OS, you can suppress the warning with the
+setting of disable_secret_security_check.
diff --git a/doc/w3m.1 b/doc/w3m.1
@@ -120,9 +120,6 @@ use cookie.
.B -no-cookie
don't use cookie
.TP
-.B -pauth user:pass
-proxy authentication
-.TP
.B -s
squeeze multiple blank lines
.TP
diff --git a/file.c b/file.c
@@ -1924,6 +1924,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
UFclose(&f);
add_auth_cookie_flag = 1;
status = HTST_NORMAL;
+ add_auth_user_passwd(auth_pu, qstr_unquote(realm)->ptr, uname, pwd, 1);
goto load_doc;
}
}
diff --git a/fm.h b/fm.h
@@ -979,8 +979,6 @@ global int IgnoreCase init(TRUE);
global int WrapSearch init(FALSE);
global int squeezeBlankLine init(FALSE);
global char *BookmarkFile init(NULL);
-global char *pauth init(NULL);
-global Str proxy_auth_cookie init(NULL);
global int UseExternalDirBuffer init(TRUE);
global char *DirBufferCommand init("file:///$LIB/dirlist" CGI_EXTENSION);
#ifdef USE_DICT
diff --git a/main.c b/main.c
@@ -242,7 +242,6 @@ fusage(FILE * f, int err)
fprintf(f,
" -cookie use cookie (-no-cookie: don't use cookie)\n");
#endif /* USE_COOKIE */
- fprintf(f, " -pauth user:pass proxy authentication\n");
fprintf(f, " -graph use graphic character\n");
fprintf(f, " -no-graph don't use graphic character\n");
#ifdef DEBIAN /* replaced by ukai: pager requires -s */
@@ -326,12 +325,13 @@ sig_chld(int signo)
pid_t pid;
#ifdef HAVE_WAITPID
- while ((pid = waitpid(-1, &p_stat, WNOHANG)) > 0) {
+ while ((pid = waitpid(-1, &p_stat, WNOHANG)) > 0)
#elif HAVE_WAIT3
- while ((pid = wait3(&p_stat, WNOHANG, NULL)) > 0) {
+ while ((pid = wait3(&p_stat, WNOHANG, NULL)) > 0)
#else
- if ((pid = wait(&p_stat)) > 0) {
+ if ((pid = wait(&p_stat)) > 0)
#endif
+ {
DownloadList *d;
if (WIFEXITED(p_stat)) {
@@ -702,17 +702,6 @@ main(int argc, char **argv, char **envp)
accept_cookie = TRUE;
}
#endif /* USE_COOKIE */
- else if (!strcmp("-pauth", argv[i])) {
- if (++i >= argc)
- usage();
- proxy_auth_cookie = Strnew_m_charp("Basic ",
- encodeB(argv[i])->ptr,
- NULL);
- while (argv[i][0]) {
- argv[i][0] = '\0';
- argv[i]++;
- }
- }
#ifdef DEBIAN
else if (!strcmp("-s", argv[i]))
#else
diff --git a/url.c b/url.c
@@ -1379,7 +1379,6 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
Str tmp;
TextListItem *i;
int seen_www_auth = 0;
- int seen_proxy_auth = 0;
#ifdef USE_COOKIE
Str cookie;
#endif /* USE_COOKIE */
@@ -1403,7 +1402,6 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
}
if (strncasecmp(i->ptr, "Proxy-Authorization:",
sizeof("Proxy-Authorization:") - 1) == 0) {
- seen_proxy_auth = 1;
#ifdef USE_SSL
if (pu->scheme == SCM_HTTPS
&& hr->command != HR_COMMAND_CONNECT)