summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2006-07-09 01:25:06 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2006-07-09 01:25:06 +0000
commit5bbd5f259ee7bc128d9b7436e7c864606b8d4d66 (patch)
tree7b91341cf03d62b25edcd8d415c2fb2801a1d122
parent6d92ee72bd9143e575ff3b6124687ded22ecc893 (diff)
downloadnetsurf-5bbd5f259ee7bc128d9b7436e7c864606b8d4d66.tar.gz
netsurf-5bbd5f259ee7bc128d9b7436e7c864606b8d4d66.tar.bz2
Don't cache curl handles that were used to fetch https URLs; with any
luck, this should fix broken pipe crashes. svn path=/trunk/netsurf/; revision=2723
-rw-r--r--content/fetch.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/content/fetch.c b/content/fetch.c
index 19fafccbe..c9c448736 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -743,8 +743,12 @@ void fetch_stop(struct fetch *f)
codem = curl_multi_remove_handle(fetch_curl_multi,
f->curl_handle);
assert(codem == CURLM_OK);
- /* Put this curl handle into the cache if wanted. */
- fetch_cache_handle(f->curl_handle, f->host);
+ if (strncasecmp(f->url, "https:", 6)) {
+ /* Put this curl handle into the cache if wanted. */
+ fetch_cache_handle(f->curl_handle, f->host);
+ } else {
+ curl_easy_cleanup(f->curl_handle);
+ }
f->curl_handle = 0;
/* Remove this from the active set of fetches (if it's still there) */
RING_REMOVE(fetch_ring, f);