aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/http.c
diff options
context:
space:
mode:
authorMichael J. Walsh <mjfwalsh@gmail.com>2023-03-03 16:24:02 +0000
committerMarton Balint <cus@passwd.hu>2023-03-08 23:40:58 +0100
commit6f1c00695973b48d5cb7ed574577634634f8a084 (patch)
tree2731ed11e137cfcb823f7d4a5175b280b4230953 /libavformat/http.c
parent4e3916dbce629a411ba9d04bf395c8f80aa681fa (diff)
downloadffmpeg-6f1c00695973b48d5cb7ed574577634634f8a084.tar.gz
avformat/http: cookie path attribute should be optional not compulsory
The path attribute in the Set-Cookie header is optional but treated by ffmpeg as being compulsory. Signed-off-by: Michael J. Walsh <mjfwalsh@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/http.c')
-rw-r--r--libavformat/http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index 7bce821535..0817aafb5b 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -1293,9 +1293,9 @@ static int get_cookies(HTTPContext *s, char **cookies, const char *path,
goto skip_cookie;
}
- // ensure this cookie matches the path
+ // if a cookie path is provided, ensure the request path is within that path
e = av_dict_get(cookie_params, "path", NULL, 0);
- if (!e || av_strncasecmp(path, e->value, strlen(e->value)))
+ if (e && av_strncasecmp(path, e->value, strlen(e->value)))
goto skip_cookie;
// cookie parameters match, so copy the value