summaryrefslogtreecommitdiff
path: root/lib/file.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/file.c
parent53e71e47d6b81650d26ec33a58d0dca24c7ffb2c (diff)
downloadgnurl-46133aa536f7f5bf552b83369e3851b6f811299e.tar.gz
gnurl-46133aa536f7f5bf552b83369e3851b6f811299e.tar.bz2
gnurl-46133aa536f7f5bf552b83369e3851b6f811299e.zip
escape: avoid using curl_easy_unescape() internally
Since the internal Curl_urldecode() function has a better API.
Diffstat (limited to 'lib/file.c')
-rw-r--r--lib/file.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/file.c b/lib/file.c
index b534ec18d..d48adb9eb 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -193,11 +193,12 @@ static CURLcode file_connect(struct connectdata *conn, bool *done)
int i;
char *actual_path;
#endif
- int real_path_len;
+ size_t real_path_len;
- real_path = curl_easy_unescape(data, data->state.path, 0, &real_path_len);
- if(!real_path)
- return CURLE_OUT_OF_MEMORY;
+ CURLcode result = Curl_urldecode(data, data->state.path, 0, &real_path,
+ &real_path_len, FALSE);
+ if(result)
+ return result;
#ifdef DOS_FILESYSTEM
/* If the first character is a slash, and there's