mirror of
https://github.com/curl/curl.git
synced 2026-08-26 17:53:33 +03:00
cookie: simplifications
- add Curl_secure_context(), to have it determined in a single place. - tweak the Curl_cookie_getlist() proto. Move some logic into the function - at is only called in a single place. Instead of forcing the caller to do it. - make 'is_ip' a const Closes #18419
This commit is contained in:
parent
f08ecdc586
commit
fe01ace248
3 changed files with 22 additions and 27 deletions
10
lib/cookie.h
10
lib/cookie.h
|
|
@ -105,21 +105,21 @@ struct CookieInfo {
|
|||
#define MAX_COOKIE_SEND_AMOUNT 150
|
||||
|
||||
struct Curl_easy;
|
||||
struct connectdata;
|
||||
|
||||
/*
|
||||
* Add a cookie to the internal list of cookies. The domain and path arguments
|
||||
* are only used if the header boolean is TRUE.
|
||||
*/
|
||||
|
||||
bool Curl_secure_context(struct connectdata *conn, const char *host);
|
||||
struct Cookie *Curl_cookie_add(struct Curl_easy *data,
|
||||
struct CookieInfo *c, bool header,
|
||||
bool noexpiry, const char *lineptr,
|
||||
const char *domain, const char *path,
|
||||
bool secure);
|
||||
|
||||
int Curl_cookie_getlist(struct Curl_easy *data,
|
||||
struct CookieInfo *c, const char *host,
|
||||
const char *path, bool secure,
|
||||
struct Curl_llist *list);
|
||||
int Curl_cookie_getlist(struct Curl_easy *data, struct connectdata *conn,
|
||||
const char *host, struct Curl_llist *list);
|
||||
void Curl_cookie_clearall(struct CookieInfo *cookies);
|
||||
void Curl_cookie_clearsess(struct CookieInfo *cookies);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue