Skip to content
Snippets Groups Projects
cookie.c 28.8 KiB
Newer Older
  • Learn to ignore specific revisions
  •   c = data->cookies->cookies;
    
      beg = list;
      while (c) {
        /* fill the list with _all_ the cookies we know */
        line = get_netscape_format(c);
        if (line == NULL) {
          /* get_netscape_format returns null only if we run out of memory */
    
          curl_slist_free_all(beg); /* free some memory */
          return NULL;
        }
        list = curl_slist_append(list, line);
        free(line);
        c = c->next;
      }
    
      return list;
    
    #endif /* CURL_DISABLE_HTTP || CURL_DISABLE_COOKIES */