Accept incomplete http cookies without domain.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Mon, 10 Jun 2013 08:52:40 +0000 (10:52 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Mon, 10 Jun 2013 08:52:40 +0000 (10:52 +0200)
Works around a bug in some servers that apparently send incomplete cookies.
Fixes a part of ticket #2619.

Reviewed-by: Micah Galizia
libavformat/http.c

index 7f33eca..e75ad9e 100644 (file)
@@ -421,6 +421,8 @@ static int get_cookies(HTTPContext *s, char **cookies, const char *path,
                 cvalue = av_strdup(param);
             }
         }
+        if (!cdomain)
+            cdomain = av_strdup(domain);
 
         // ensure all of the necessary values are valid
         if (!cdomain || !cpath || !cvalue) {