diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2021-02-06 04:07:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-06 04:07:40 +0000 |
commit | e66ca9fa4ee8eb9e9370bba0bfa4d2084a300a3e (patch) | |
tree | 759d7d3bd2023845ab491d0f1810c8f278c6b150 /file.c | |
parent | Update ChangeLog (diff) | |
parent | Clarify inline image setting's wording (diff) | |
download | w3m-e66ca9fa4ee8eb9e9370bba0bfa4d2084a300a3e.tar.gz w3m-e66ca9fa4ee8eb9e9370bba0bfa4d2084a300a3e.zip |
Merge pull request #161 from bptato/master
Improved inline image protocol support
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1175,7 +1175,11 @@ AuthBasicCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu, Str s = Strdup(uname); Strcat_char(s, ':'); Strcat(s, pw); - return Strnew_m_charp("Basic ", encodeB(s->ptr)->ptr, NULL); + char *base64 = base64_encode(s->ptr, s->length); + if (!base64) + return Strnew_charp("Basic "); + else + return Strnew_m_charp("Basic ", base64, NULL); } #ifdef USE_DIGEST_AUTH |