From patchwork Sat Aug 27 15:36:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 317 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp900767vsd; Sat, 27 Aug 2016 08:36:34 -0700 (PDT) X-Received: by 10.194.87.67 with SMTP id v3mr8643787wjz.103.1472312194826; Sat, 27 Aug 2016 08:36:34 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b72si4249911wme.90.2016.08.27.08.36.33; Sat, 27 Aug 2016 08:36:34 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A470D689B7C; Sat, 27 Aug 2016 18:36:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe04-1.mx.upcmail.net (vie01a-dmta-pe04-1.mx.upcmail.net [62.179.121.163]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 662ED689B7E for ; Sat, 27 Aug 2016 18:36:04 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe04.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1bdfeQ-00049c-RG for ffmpeg-devel@ffmpeg.org; Sat, 27 Aug 2016 17:36:06 +0200 Received: from [192.168.1.3] ([80.110.104.206]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id cFc51t00q4TCAhL01Fc6YX; Sat, 27 Aug 2016 17:36:06 +0200 X-SourceIP: 80.110.104.206 From: Carl Eugen Hoyos To: FFmpeg development discussions and patches Date: Sat, 27 Aug 2016 17:36:05 +0200 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Message-Id: <201608271736.05561.cehoyos@ag.or.at> Subject: [FFmpeg-devel] [PATCH]lavf/httpauth: Do case-insensitive http header checks. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! Attached patch fixes ticket #5786. Please comment, Carl Eugen From 3b9380e0a4e715dcbc3ff508235ccad14a01ad37 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 27 Aug 2016 17:27:48 +0200 Subject: [PATCH] lavf/httpauth: Do case-insensitive http header checks. Fixes ticket #5786. --- libavformat/httpauth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/httpauth.c b/libavformat/httpauth.c index 18cf36b..2d42ab2 100644 --- a/libavformat/httpauth.c +++ b/libavformat/httpauth.c @@ -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); }