Commit 6f1c0069 authored by Michael J. Walsh's avatar Michael J. Walsh Committed by Marton Balint

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: 's avatarMichael J. Walsh <mjfwalsh@gmail.com>
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 4e3916db
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment