summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/cookie.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-10-08 20:30:41 (GMT)
committerBrad King <brad.king@kitware.com>2014-10-29 20:43:21 (GMT)
commit80c881f7938969dab169f4fc4fbf8bc3d4355fc2 (patch)
tree77abe643bf8fcb388056480350b99b666f543965 /Utilities/cmcurl/lib/cookie.h
parentff67d2b57946a29e18d1947efe71f26ece9e1747 (diff)
parent3fe5d9bff98b4716e219516c30d71462495324f4 (diff)
downloadCMake-80c881f7938969dab169f4fc4fbf8bc3d4355fc2.zip
CMake-80c881f7938969dab169f4fc4fbf8bc3d4355fc2.tar.gz
CMake-80c881f7938969dab169f4fc4fbf8bc3d4355fc2.tar.bz2
Merge branch 'curl-upstream' into update-curl
Resolve all conflicts in favor of the upstream side. We can re-apply specific changes later.
Diffstat (limited to 'Utilities/cmcurl/lib/cookie.h')
-rw-r--r--Utilities/cmcurl/lib/cookie.h45
1 files changed, 21 insertions, 24 deletions
diff --git a/Utilities/cmcurl/lib/cookie.h b/Utilities/cmcurl/lib/cookie.h
index 57c3acb..bd89082 100644
--- a/Utilities/cmcurl/lib/cookie.h
+++ b/Utilities/cmcurl/lib/cookie.h
@@ -1,5 +1,5 @@
-#ifndef __COOKIE_H
-#define __COOKIE_H
+#ifndef HEADER_CURL_COOKIE_H
+#define HEADER_CURL_COOKIE_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -20,17 +20,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
- * $Id$
***************************************************************************/
-
-#include <stdio.h>
-#if defined(WIN32)
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#endif
+#include "curl_setup.h"
#include <curl/curl.h>
@@ -38,7 +29,8 @@ struct Cookie {
struct Cookie *next; /* next in the chain */
char *name; /* <this> = value */
char *value; /* name = <this> */
- char *path; /* path = <this> */
+ char *path; /* path = <this> which is in Set-Cookie: */
+ char *spath; /* sanitized cookie path */
char *domain; /* domain = <this> */
curl_off_t expires; /* expires = <this> */
char *expirestr; /* the plain text version */
@@ -50,6 +42,7 @@ struct Cookie {
bool secure; /* whether the 'secure' keyword was used */
bool livecookie; /* updated from a server, not a stored file */
+ bool httponly; /* true if the httponly directive is present */
};
struct CookieInfo {
@@ -84,24 +77,28 @@ struct SessionHandle;
*/
struct Cookie *Curl_cookie_add(struct SessionHandle *data,
- struct CookieInfo *, bool header, char *line,
- char *domain, char *path);
+ struct CookieInfo *, bool header, char *lineptr,
+ const char *domain, const char *path);
-struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
- char *, struct CookieInfo *, bool);
-struct Cookie *Curl_cookie_getlist(struct CookieInfo *, char *, char *, bool);
-void Curl_cookie_freelist(struct Cookie *);
+struct Cookie *Curl_cookie_getlist(struct CookieInfo *, const char *,
+ const char *, bool);
+void Curl_cookie_freelist(struct Cookie *cookies, bool cookiestoo);
void Curl_cookie_clearall(struct CookieInfo *cookies);
void Curl_cookie_clearsess(struct CookieInfo *cookies);
-void Curl_cookie_cleanup(struct CookieInfo *);
-int Curl_cookie_output(struct CookieInfo *, char *);
#if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_COOKIES)
#define Curl_cookie_list(x) NULL
-#define Curl_cookie_loadfiles(x) do { } while (0)
+#define Curl_cookie_loadfiles(x) Curl_nop_stmt
+#define Curl_cookie_init(x,y,z,w) NULL
+#define Curl_cookie_cleanup(x) Curl_nop_stmt
+#define Curl_flush_cookies(x,y) Curl_nop_stmt
#else
+void Curl_flush_cookies(struct SessionHandle *data, int cleanup);
+void Curl_cookie_cleanup(struct CookieInfo *);
+struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
+ const char *, struct CookieInfo *, bool);
struct curl_slist *Curl_cookie_list(struct SessionHandle *data);
void Curl_cookie_loadfiles(struct SessionHandle *data);
#endif
-#endif
+#endif /* HEADER_CURL_COOKIE_H */