ce40e23f075832f24396e2c2638ee1dfad83acca galt Tue Feb 4 17:26:46 2014 -0800 Fixes #12630. This addresses a bug in + handling in FTP URLs which only have a path part and no query part. Added cgiDecodeFull function to parallel the existing cgiEncodeFull function. These functions ignore the + character when encoding. diff --git src/lib/net.c src/lib/net.c index 8f850df..5596bb2 100644 --- src/lib/net.c +++ src/lib/net.c @@ -488,31 +488,31 @@ sameWord(parsed->protocol,"https")) { // http servers expect the URL request to be URL-encoded already. /* need to encode spaces, but not ! other characters */ char *t=replaceChars(u," ","%20"); safecpy(parsed->file, sizeof(parsed->file), t); freeMem(t); } *u = 0; // terminate the host:port string if (sameWord(parsed->protocol,"ftp")) { ++u; // that first slash is not considered part of the ftp path // decode now because the FTP server does NOT expect URL-encoding. - cgiDecode(u,parsed->file,strlen(u)); + cgiDecodeFull(u,parsed->file,strlen(u)); // decodes %FF but not + } } /* Split off user part */ v = strchr(s, '@'); if (v == NULL) { if (sameWord(parsed->protocol,"http") || sameWord(parsed->protocol,"https")) { strcpy(parsed->user, ""); strcpy(parsed->password, ""); } if (sameWord(parsed->protocol,"ftp"))