Lines Matching defs:cookies
102 char *cookies; ///< holds newline (\n) delimited Set-Cookie header field values (without the "Set-Cookie: " field name)
103 /* A dictionary containing cookies keyed by cookie name */
158 { "cookies", "set cookies to be sent in applicable future requests, use newline delimited Set-Cookie HTTP field value syntax", OFFSET(cookies), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D },
960 static int parse_cookie(HTTPContext *s, const char *p, AVDictionary **cookies)
990 e2 = av_dict_get(*cookies, cookie_entry->key, NULL, 0);
1017 av_dict_set(cookies, name, eql, AV_DICT_DONT_STRDUP_KEY);
1022 static int cookie_string(AVDictionary *dict, char **cookies)
1027 // determine how much memory is needed for the cookies string
1031 // reallocate the cookies
1033 if (*cookies) av_free(*cookies);
1034 *cookies = av_malloc(len);
1035 if (!*cookies) return AVERROR(ENOMEM);
1036 *cookies[0] = '\0';
1038 // write out the cookies
1040 av_strlcatf(*cookies, len, "%s%s\n", e->key, e->value);
1232 * the HTTP protocol context. The cookie string is stored in *cookies, and may
1233 * be NULL if there are no valid cookies.
1237 static int get_cookies(HTTPContext *s, char **cookies, const char *path,
1246 // destroy any cookies in the dictionary.
1249 if (!s->cookies)
1252 next = set_cookies = av_strdup(s->cookies);
1256 *cookies = NULL;
1302 if (!*cookies) {
1303 *cookies = av_asprintf("%s=%s", cookie_entry->key, cookie_entry->value);
1305 char *tmp = *cookies;
1306 *cookies = av_asprintf("%s; %s=%s", tmp, cookie_entry->key, cookie_entry->value);
1309 if (!*cookies)
1361 // add any new cookies into the existing cookie string
1362 cookie_string(s->cookie_dict, &s->cookies);
1487 if (!has_header(s->headers, "\r\nCookie: ") && s->cookies) {
1488 char *cookies = NULL;
1489 if (!get_cookies(s, &cookies, path, hoststr) && cookies) {
1490 av_bprintf(&request, "Cookie: %s\r\n", cookies);
1491 av_free(cookies);