diff options
Diffstat (limited to '')
-rw-r--r-- | file.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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 |