mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:53:32 +03:00
cookies: when reading from a file, only remove_expired once
This drops the cookie load time for 8k cookies from 178ms to 15ms. Closes #2441
This commit is contained in:
parent
28faaacee2
commit
4073cd83b2
4 changed files with 12 additions and 6 deletions
|
|
@ -781,11 +781,13 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option,
|
|||
|
||||
if(checkprefix("Set-Cookie:", argptr))
|
||||
/* HTTP Header format line */
|
||||
Curl_cookie_add(data, data->cookies, TRUE, argptr + 11, NULL, NULL);
|
||||
Curl_cookie_add(data, data->cookies, TRUE, FALSE, argptr + 11, NULL,
|
||||
NULL);
|
||||
|
||||
else
|
||||
/* Netscape format line */
|
||||
Curl_cookie_add(data, data->cookies, FALSE, argptr, NULL, NULL);
|
||||
Curl_cookie_add(data, data->cookies, FALSE, FALSE, argptr, NULL,
|
||||
NULL);
|
||||
|
||||
Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
|
||||
free(argptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue