summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--dpi/downloads.cc8
-rw-r--r--dpi/file.c2
-rw-r--r--dpi/ftp.c2
-rw-r--r--src/auth.c4
5 files changed, 9 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 06356a43..cec7df21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,7 @@ dillo-2.1
- Set the ScrollGroup as the resizable widget in downloads dpi.
- Cleaned up and normalized D_SUN_LEN usage.
- Fixed incorrect use of VOIDP2INT in Dialog_user_password_cb().
+ - Ensure that the dlib dStr* functions are used everywhere.
Patches: Jeremy Henty
+- Implemented Basic authentication!
Patch: Jeremy Henty, Jorge Arellano Cid
diff --git a/dpi/downloads.cc b/dpi/downloads.cc
index 053d2de0..bafb90d7 100644
--- a/dpi/downloads.cc
+++ b/dpi/downloads.cc
@@ -294,7 +294,7 @@ DLItem::DLItem(const char *full_filename, const char *url, DLAction action)
char *p, *esc_url;
if (pipe(LogPipe) < 0) {
- MSG("pipe, %s\n", strerror(errno));
+ MSG("pipe, %s\n", dStrerror(errno));
return;
}
/* Set FD to background */
@@ -685,7 +685,7 @@ void DLItem::update()
/* Update curr_size */
if (stat(fullname, &ss) == -1) {
- MSG("stat, %s\n", strerror(errno));
+ MSG("stat, %s\n", dStrerror(errno));
return;
}
update_size((int)ss.st_size);
@@ -833,7 +833,7 @@ static ssize_t readline(int socket, Dstr ** msg)
while (st < 0 && errno == EINTR);
if (st == -1)
- MSG("readline, %s\n", strerror(errno));
+ MSG("readline, %s\n", dStrerror(errno));
dStr_truncate(*msg, 0);
if (st > 0)
@@ -888,7 +888,7 @@ static void read_req_cb(int req_fd, void *)
new_socket = accept(req_fd, (struct sockaddr *) &clnt_addr, &csz);
} while (new_socket == -1 && errno == EINTR);
if (new_socket == -1) {
- MSG("accept, %s fd=%d\n", strerror(errno), req_fd);
+ MSG("accept, %s fd=%d\n", dStrerror(errno), req_fd);
return;
}
diff --git a/dpi/file.c b/dpi/file.c
index a3cfccaa..aef593f7 100644
--- a/dpi/file.c
+++ b/dpi/file.c
@@ -673,7 +673,7 @@ static int File_get_file(ClientInfo *Client,
* calling exit() */
if (st == -1) {
MSG("ERROR while reading from file \"%s\", error was \"%s\"\n",
- filename, strerror(errno));
+ filename, dStrerror(errno));
exit(1);
}
diff --git a/dpi/ftp.c b/dpi/ftp.c
index 139444c9..666a6761 100644
--- a/dpi/ftp.c
+++ b/dpi/ftp.c
@@ -187,7 +187,7 @@ static int try_ftp_transfer(char *url)
int DataPipe[2];
if (pipe(DataPipe) < 0) {
- MSG("pipe, %s\n", strerror(errno));
+ MSG("pipe, %s\n", dStrerror(errno));
return 0;
}
diff --git a/src/auth.c b/src/auth.c
index 41388485..e0bd62a8 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -234,7 +234,7 @@ static int Auth_parse_token_value(AuthParse_t *auth_parse, char **auth)
/* is this value the realm? */
set_realm =
auth_parse->realm == NULL &&
- strncasecmp(realm_token,token,token_size) == 0 &&
+ dStrncasecmp(realm_token,token,token_size) == 0 &&
strlen(realm_token) == token_size;
return Auth_parse_quoted_string(auth_parse, set_realm, auth);
@@ -275,7 +275,7 @@ static void Auth_parse_auth_basic(AuthParse_t *auth_parse, char **auth)
static void Auth_parse_auth(AuthParse_t *auth_parse, char *auth)
{
_MSG("auth.c: Auth_parse_auth: auth = '%s'\n", auth);
- if (strncasecmp(auth, "Basic ", 6) == 0) {
+ if (dStrncasecmp(auth, "Basic ", 6) == 0) {
auth += 6;
Auth_parse_auth_basic(auth_parse, &auth);
} else {