From 46133aa536f7f5bf552b83369e3851b6f811299e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 8 Oct 2016 11:21:38 +0200 Subject: escape: avoid using curl_easy_unescape() internally Since the internal Curl_urldecode() function has a better API. --- lib/gopher.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/gopher.c') diff --git a/lib/gopher.c b/lib/gopher.c index dcdd93fbb..4939ad540 100644 --- a/lib/gopher.c +++ b/lib/gopher.c @@ -35,6 +35,7 @@ #include "rawstr.h" #include "select.h" #include "url.h" +#include "escape.h" #include "warnless.h" #include "curl_memory.h" /* The last #include file should be: */ @@ -83,7 +84,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) char *sel; char *sel_org = NULL; ssize_t amount, k; - int len; + size_t len; *done = TRUE; /* unconditionally */ @@ -107,7 +108,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) newp[i] = '\x09'; /* ... and finally unescape */ - sel = curl_easy_unescape(data, newp, 0, &len); + result = Curl_urldecode(data, newp, 0, &sel, &len, FALSE); if(!sel) return CURLE_OUT_OF_MEMORY; sel_org = sel; -- cgit v1.2.1