aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--file.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/file.c b/file.c
index 8718dd3..836af97 100644
--- a/file.c
+++ b/file.c
@@ -1179,11 +1179,7 @@ AuthBasicCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu,
Str s = Strdup(uname);
Strcat_char(s, ':');
Strcat(s, pw);
- char *base64 = base64_encode(s->ptr, s->length);
- if (!base64)
- return Strnew_charp("Basic ");
- else
- return Strnew_m_charp("Basic ", base64, NULL);
+ return Strnew_m_charp("Basic ", base64_encode(s->ptr, s->length)->ptr, NULL);
}
#ifdef USE_DIGEST_AUTH