Ticket #3806: cookies.patch
| File cookies.patch, 1.8 KB (added by , 12 years ago) |
|---|
-
libavformat/http.c
diff --git a/libavformat/http.c b/libavformat/http.c index 33585b0..4acb175 100644
a b static int get_cookies(HTTPContext *s, char **cookies, const char *path, 548 548 char *param, *next_param, *cdomain = NULL, *cpath = NULL, *cvalue = NULL; 549 549 set_cookies = NULL; 550 550 551 while ((param = av_strtok(cookie, "; ", &next_param))) {551 while ((param = av_strtok(cookie, ";", &next_param))) { 552 552 cookie = NULL; 553 if (next_param) 554 while (av_isspace(*next_param)) next_param++; 553 555 if (!av_strncasecmp("path=", param, 5)) { 554 556 av_free(cpath); 555 557 cpath = av_strdup(¶m[5]); … … static int get_cookies(HTTPContext *s, char **cookies, const char *path, 559 561 int leading_dot = (param[7] == '.'); 560 562 av_free(cdomain); 561 563 cdomain = av_strdup(¶m[7+leading_dot]); 562 } else if (!av_strncasecmp("secure", param, 6) || 563 !av_strncasecmp("comment", param, 7) || 564 !av_strncasecmp("max-age", param, 7) || 565 !av_strncasecmp("version", param, 7)) { 566 // ignore Comment, Max-Age, Secure and Version 564 } else if (!av_strncasecmp("secure", param, 6) || 565 !av_strncasecmp("comment", param, 7) || 566 !av_strncasecmp("expires", param, 7) || 567 !av_strncasecmp("max-age", param, 7) || 568 !av_strncasecmp("version", param, 7) || 569 !av_strncasecmp("httponly", param, 8)) { 570 // ignore Comment, Expires, HttpOnly, Max-Age, Secure and Version 567 571 } else { 568 572 av_free(cvalue); 569 573 cvalue = av_strdup(param);
