[w3m-dev 03336] proxy check for https authorization:
* url.c (HTTPrequest): check CONNECT request for ssl From: AIDA Shinra <aida-s@jcom.home.ne.jp>
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2002-10-09 AIDA Shinra <aida-s@jcom.home.ne.jp>
|
||||
|
||||
* [w3m-dev 03336] proxy check for https authorization:
|
||||
* url.c (HTTPrequest): check CONNECT request for ssl
|
||||
|
||||
2002-10-06 Hiroyuki Ito <hito@crl.go.jp>
|
||||
|
||||
* [w3m-dev 03333] x11 image animation
|
||||
@@ -3886,4 +3891,4 @@
|
||||
* release-0-2-1
|
||||
* import w3m-0.2.1
|
||||
|
||||
$Id: ChangeLog,v 1.438 2002/10/05 16:43:10 ukai Exp $
|
||||
$Id: ChangeLog,v 1.439 2002/10/08 15:28:37 ukai Exp $
|
||||
|
30
url.c
30
url.c
@@ -1,4 +1,4 @@
|
||||
/* $Id: url.c,v 1.51 2002/09/28 16:30:07 ukai Exp $ */
|
||||
/* $Id: url.c,v 1.52 2002/10/08 15:28:37 ukai Exp $ */
|
||||
#include "fm.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
@@ -1310,22 +1310,42 @@ HTTPrequest(ParsedURL *pu, ParsedURL *current, HRequest *hr, TextList *extra)
|
||||
if (extra != NULL)
|
||||
for (i = extra->first; i != NULL; i = i->next) {
|
||||
if (strncasecmp(i->ptr, "Authorization:",
|
||||
sizeof("Authorization:") - 1) == 0)
|
||||
sizeof("Authorization:") - 1) == 0) {
|
||||
seen_www_auth = 1;
|
||||
#ifdef USE_SSL
|
||||
if (hr->command == HR_COMMAND_CONNECT)
|
||||
continue;
|
||||
#endif
|
||||
}
|
||||
if (strncasecmp(i->ptr, "Proxy-Authorization:",
|
||||
sizeof("Proxy-Authorization:") - 1) == 0)
|
||||
sizeof("Proxy-Authorization:") - 1) == 0) {
|
||||
seen_proxy_auth = 1;
|
||||
#ifdef USE_SSL
|
||||
if (pu->scheme == SCM_HTTPS
|
||||
&& hr->command != HR_COMMAND_CONNECT)
|
||||
continue;
|
||||
#endif
|
||||
}
|
||||
Strcat_charp(tmp, i->ptr);
|
||||
}
|
||||
|
||||
if (!seen_www_auth) {
|
||||
if (!seen_www_auth
|
||||
#ifdef USE_SSL
|
||||
&& hr->command != HR_COMMAND_CONNECT
|
||||
#endif
|
||||
) {
|
||||
Str auth_cookie = find_auth_cookie(pu->host, pu->port, pu->file, NULL);
|
||||
if (auth_cookie)
|
||||
Strcat_m_charp(tmp, "Authorization: ", auth_cookie->ptr,
|
||||
"\r\n", NULL);
|
||||
}
|
||||
|
||||
if (!seen_proxy_auth && (hr->flag & HR_FLAG_PROXY)) {
|
||||
if (!seen_proxy_auth && (hr->flag & HR_FLAG_PROXY)
|
||||
#ifdef USE_SSL
|
||||
&& (pu->scheme != SCM_HTTPS
|
||||
|| hr->command == HR_COMMAND_CONNECT)
|
||||
#endif
|
||||
) {
|
||||
ParsedURL *proxy_pu = schemeToProxy(pu->scheme);
|
||||
Str auth_cookie = find_auth_cookie(
|
||||
proxy_pu->host, proxy_pu->port, proxy_pu->file, NULL);
|
||||
|
Reference in New Issue
Block a user