summaryrefslogtreecommitdiff
path: root/lib/gopher.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-10-08 11:21:38 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-10-31 08:46:35 +0100
commit46133aa536f7f5bf552b83369e3851b6f811299e (patch)
treec10a2320da0e6e4ef0027d8267c68fe1d706bce6 /lib/gopher.c
parent53e71e47d6b81650d26ec33a58d0dca24c7ffb2c (diff)
downloadcurl-46133aa536f7f5bf552b83369e3851b6f811299e.tar.gz
escape: avoid using curl_easy_unescape() internally
Since the internal Curl_urldecode() function has a better API.
Diffstat (limited to 'lib/gopher.c')
-rw-r--r--lib/gopher.c5
1 files changed, 3 insertions, 2 deletions
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;