diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-12-05 23:59:32 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-12-05 23:59:32 +0000 |
commit | ac269a8f68323db6b579f11f864035bc2691081d (patch) | |
tree | 5bc2116fe477a0b7b01a07331413ba61d8e7306b /lib/url.c | |
parent | 35944744f84f8127529b315951946416fa592a7c (diff) |
Dan Fandrich added the --disable-cookies option to configure to build
libcurl without cookie support. This is mainly useful if you want to build a
minimalistic libcurl with no cookies support at all. Like for embedded
systems or similar.
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -214,9 +214,6 @@ CURLcode Curl_close(struct SessionHandle *data) Curl_SSL_Close_All(data); #endif - if(data->change.cookielist) /* clean up list if any */ - curl_slist_free_all(data->change.cookielist); - Curl_safefree(data->state.first_host); Curl_safefree(data->state.scratch); @@ -231,7 +228,10 @@ CURLcode Curl_close(struct SessionHandle *data) Curl_safefree(data->state.headerbuff); -#ifndef CURL_DISABLE_HTTP +#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) + if(data->change.cookielist) /* clean up list if any */ + curl_slist_free_all(data->change.cookielist); + Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE); if(data->set.cookiejar) { /* we have a "destination" for all the cookies to get dumped to */ @@ -244,11 +244,11 @@ CURLcode Curl_close(struct SessionHandle *data) Curl_cookie_cleanup(data->cookies); } Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE); +#endif -#ifndef CURL_DISABLE_CRYPTO_AUTH +#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH) Curl_digest_cleanup(data); #endif -#endif /* free the connection cache */ free(data->state.connects); @@ -719,6 +719,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) data->set.http200aliases = va_arg(param, struct curl_slist *); break; +#if !defined(CURL_DISABLE_COOKIES) case CURLOPT_COOKIE: /* * Cookie string to send to the remote server in the request. @@ -776,6 +777,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) */ data->set.cookiesession = (bool)va_arg(param, long); break; +#endif case CURLOPT_HTTPGET: /* @@ -1310,7 +1312,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) data->hostcache = data->share->hostcache; } -#ifndef CURL_DISABLE_HTTP +#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) if(data->share->cookies) { /* use shared cookie list, first free own one if any */ if (data->cookies) @@ -1321,7 +1323,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) Curl_share_unlock(data, CURL_LOCK_DATA_SHARE); } -#ifndef CURL_DISABLE_HTTP +#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) /* check cookie list is set */ if(!data->cookies) data->cookies = Curl_cookie_init(data, NULL, NULL, TRUE ); |