DervishD <[EMAIL PROTECTED]> writes:
> I've got and tested it, and with NO wgetrc (it happens the same
> with my own wgetrc, but I tested clean just in case), the problem
> with the quoting still exists:
>
> $wget -r -c -nH "ftp://user:[EMAIL PROTECTED]/Music/Joe Hisaishi"
[...]
> --15:22:55-- ftp://user:[EMAIL PROTECTED]/Music%2fJoe%20Hisaishi/Joe%20Hisaishi
> => `Music%2FJoe Hisaishi/.listing'
Thanks for the detailed bug report. Although it doesn't look that
way, this problem is nothing but a simple oversight. (A function that
was supposed to URL-encode everything except slashes failed to enforce
the exception.) This patch should fix it:
2003-09-24 Hrvoje Niksic <[EMAIL PROTECTED]>
* url.c (url_escape_1): Revert unintentional change to lowercase
xdigit escapes.
(url_escape_dir): Document that this function depends on the
output of url_escape_1.
Index: src/url.c
===================================================================
RCS file: /pack/anoncvs/wget/src/url.c,v
retrieving revision 1.94
diff -u -r1.94 url.c
--- src/url.c 2003/09/22 12:07:20 1.94
+++ src/url.c 2003/09/24 14:10:48
@@ -198,8 +198,8 @@
{
unsigned char c = *p1++;
*p2++ = '%';
- *p2++ = XNUM_TO_digit (c >> 4);
- *p2++ = XNUM_TO_digit (c & 0xf);
+ *p2++ = XNUM_TO_DIGIT (c >> 4);
+ *p2++ = XNUM_TO_DIGIT (c & 0xf);
}
else
*p2++ = *p1++;
@@ -1130,6 +1130,7 @@
for (; *h; h++, t++)
{
+ /* url_escape_1 having converted '/' to "%2F" exactly. */
if (*h == '%' && h[1] == '2' && h[2] == 'F')
{
*t = '/';