aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-04-04 15:57:13 +0000
committerbptato <nincsnevem662@gmail.com>2021-04-04 15:57:13 +0000
commit694a10271dd33aeba7a1cf3d72caf4f1384d611a (patch)
tree4d31ab3b12b8e8f04a2538a5a082ed51fbe0a373 /file.c
parentUpdate ChangeLog (diff)
downloadw3m-694a10271dd33aeba7a1cf3d72caf4f1384d611a.tar.gz
w3m-694a10271dd33aeba7a1cf3d72caf4f1384d611a.zip
Return Str from base64_encode, fix extraction of first gif frame for animations in put_image_kitty
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