From c313524998377db92e5387d209e1ea79fbc30ba6 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 29 Jun 2016 23:06:53 +0100 Subject: reduce curl usage to fetcher, url unescaping and time parsing --- test/llcache.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'test/llcache.c') diff --git a/test/llcache.c b/test/llcache.c index 850f0608c..df51386a5 100644 --- a/test/llcache.c +++ b/test/llcache.c @@ -20,8 +20,6 @@ #include #include -#include - #include "content/fetch.h" #include "content/llcache.h" #include "utils/ring.h" @@ -94,12 +92,14 @@ char *path_to_url(const char *path) /* utils/url.h */ char *url_to_path(const char *url) { - char *url_path = curl_unescape(url, 0); - char *path; + char *url_path; + char *path = NULL; - /* return the absolute path including leading / */ - path = strdup(url_path + (FILE_SCHEME_PREFIX_LEN - 1)); - curl_free(url_path); + if (url_unescape(url, 0, &url_path) == NSERROR_OK) { + /* return the absolute path including leading / */ + path = strdup(url_path + (FILE_SCHEME_PREFIX_LEN - 1)); + free(url_path); + } return path; } -- cgit v1.2.3