1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-16 15:04:37 -04:00

fsp: call find_auth in both cases.

When the username and the password were given in the uri and when
they weren't. I'm not sure if it changes anything.
This commit is contained in:
Witold Filipczyk 2007-01-27 12:05:17 +01:00 committed by Witold Filipczyk
parent 047bf7e1c6
commit 8ef93ebf09

View File

@ -193,16 +193,16 @@ do_fsp(struct connection *conn)
FSP_SESSION *ses;
struct stat sb;
struct uri *uri = conn->uri;
struct auth_entry *auth;
struct auth_entry *auth = find_auth(uri);
unsigned char *host = get_uri_string(uri, URI_HOST);
unsigned char *data = get_uri_string(uri, URI_DATA);
unsigned short port = (unsigned short)get_uri_port(uri);
unsigned char *password = NULL;
decode_uri(data);
if (uri->passwordlen) password = get_uri_string(uri, URI_PASSWORD);
else {
auth = find_auth(conn->uri);
if (uri->passwordlen) {
password = get_uri_string(uri, URI_PASSWORD);
} else {
if (auth && auth->valid) password = auth->password;
}