diff options
Diffstat (limited to 'libavformat/httpauth.c')
-rw-r--r-- | libavformat/httpauth.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c index b0d3c0c8ca..2d42ab2190 100644 --- a/libavformat/httpauth.c +++ b/libavformat/httpauth.c @@ -2,20 +2,20 @@ * HTTP authentication * Copyright (c) 2010 Martin Storsjo * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -90,7 +90,7 @@ static void choose_qop(char *qop, int size) void ff_http_auth_handle_header(HTTPAuthState *state, const char *key, const char *value) { - if (!strcmp(key, "WWW-Authenticate") || !strcmp(key, "Proxy-Authenticate")) { + if (!av_strcasecmp(key, "WWW-Authenticate") || !av_strcasecmp(key, "Proxy-Authenticate")) { const char *p; if (av_stristart(value, "Basic ", &p) && state->auth_type <= HTTP_AUTH_BASIC) { @@ -112,7 +112,7 @@ void ff_http_auth_handle_header(HTTPAuthState *state, const char *key, if (!av_strcasecmp(state->digest_params.stale, "true")) state->stale = 1; } - } else if (!strcmp(key, "Authentication-Info")) { + } else if (!av_strcasecmp(key, "Authentication-Info")) { ff_parse_key_value(value, (ff_parse_key_val_cb) handle_digest_update, state); } @@ -225,8 +225,10 @@ static char *make_digest_auth(HTTPAuthState *state, const char *username, av_strlcatf(authstr, len, ", uri=\"%s\"", uri); av_strlcatf(authstr, len, ", response=\"%s\"", response); + // we are violating the RFC and use "" because all others seem to do that too. if (digest->algorithm[0]) - av_strlcatf(authstr, len, ", algorithm=%s", digest->algorithm); + av_strlcatf(authstr, len, ", algorithm=\"%s\"", digest->algorithm); + if (digest->opaque[0]) av_strlcatf(authstr, len, ", opaque=\"%s\"", digest->opaque); if (digest->qop[0]) { |