summaryrefslogtreecommitdiff
path: root/lib/cookie.c
diff options
context:
space:
mode:
authorDaniel Gustafsson <daniel@yesql.se>2018-09-09 08:52:04 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-09-10 08:30:24 +0200
commitc3654df166ff9bded751809af4ce6a3b1d7b0f81 (patch)
treea9fcf13f299a9812372bc95a5c46682d612d2a24 /lib/cookie.c
parent37da149670ebf0535793e13be9f46166c8303978 (diff)
downloadcurl-c3654df166ff9bded751809af4ce6a3b1d7b0f81.tar.gz
cookies: Remove redundant expired check
Expired cookies have already been purged at a later expiration time before this check, so remove the redundant check. closes #2962
Diffstat (limited to 'lib/cookie.c')
-rw-r--r--lib/cookie.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index fd7341f0b..1668f0276 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -1218,7 +1218,6 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
{
struct Cookie *newco;
struct Cookie *co;
- time_t now = time(NULL);
struct Cookie *mainco = NULL;
size_t matches = 0;
bool is_ip;
@@ -1236,11 +1235,8 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
co = c->cookies[myhash];
while(co) {
- /* only process this cookie if it is not expired or had no expire
- date AND that if the cookie requires we're secure we must only
- continue if we are! */
- if((!co->expires || (co->expires > now)) &&
- (co->secure?secure:TRUE)) {
+ /* if the cookie requires we're secure we must only continue if we are! */
+ if(co->secure?secure:TRUE) {
/* now check if the domain is correct */
if(!co->domain ||