diff options
author | Seonah Moon <seonah1.moon@samsung.com> | 2020-02-24 15:56:49 +0900 |
---|---|---|
committer | Seonah Moon <seonah1.moon@samsung.com> | 2020-02-24 15:57:31 +0900 |
commit | 1127a2d91941b474b346c96a1499f3493a3f0f40 (patch) | |
tree | e6734b853d299aa98a3653cebf0233a712c07009 /lib/cookie.h | |
parent | bc9ddd35af69662a667d983e2484f557f76cf230 (diff) | |
download | curl-upstream/7.68.0.tar.gz curl-upstream/7.68.0.tar.bz2 curl-upstream/7.68.0.zip |
Imported Upstream version 7.68.0upstream/7.68.0
Change-Id: I37422e43c2c4c25904a4fc2a391c4a32ba3b9f5c
Diffstat (limited to 'lib/cookie.h')
-rw-r--r-- | lib/cookie.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/cookie.h b/lib/cookie.h index a9f90ca71..b3865e601 100644 --- a/lib/cookie.h +++ b/lib/cookie.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2019, 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 @@ -44,8 +44,16 @@ struct Cookie { bool livecookie; /* updated from a server, not a stored file */ bool httponly; /* true if the httponly directive is present */ int creationtime; /* time when the cookie was written */ + unsigned char prefix; /* bitmap fields indicating which prefix are set */ }; +/* + * Available cookie prefixes, as defined in + * draft-ietf-httpbis-rfc6265bis-02 + */ +#define COOKIE_PREFIX__SECURE (1<<0) +#define COOKIE_PREFIX__HOST (1<<1) + #define COOKIE_HASH_SIZE 256 struct CookieInfo { @@ -85,7 +93,8 @@ struct Curl_easy; struct Cookie *Curl_cookie_add(struct Curl_easy *data, struct CookieInfo *, bool header, bool noexpiry, char *lineptr, - const char *domain, const char *path); + const char *domain, const char *path, + bool secure); struct Cookie *Curl_cookie_getlist(struct CookieInfo *, const char *, const char *, bool); @@ -100,7 +109,7 @@ void Curl_cookie_clearsess(struct CookieInfo *cookies); #define Curl_cookie_cleanup(x) Curl_nop_stmt #define Curl_flush_cookies(x,y) Curl_nop_stmt #else -void Curl_flush_cookies(struct Curl_easy *data, int cleanup); +void Curl_flush_cookies(struct Curl_easy *data, bool cleanup); void Curl_cookie_cleanup(struct CookieInfo *); struct CookieInfo *Curl_cookie_init(struct Curl_easy *data, const char *, struct CookieInfo *, bool); |