On Mon, 4 Aug 2008 08:56:34 +0200 Xavier <shiningxc@gmail.com> wrote:
On Mon, Aug 4, 2008 at 1:26 AM, Xavier <shiningxc@gmail.com> wrote:
So I patched pacman to remove an eventual trailing slash, and the patch will follow quickly. But I wonder if libdownload should not be patched as well. "Command ok" seems rather misleading. Returning the following error would be much better if it is possible : [DLERR_URL] Invalid URL
If my understanding of the libdownload code is correct "Command okay" occurs, because the server sends a 200 when libdownload expects something different. But I can't say where. I've been spending some time trying to reproduce this error, but syncing to a local ftp just works, with and without trailing slash.
I am a bit confused though now, it looks like the code already handles multiple slashes. But well, I will need to investigate it more.
C is not my strong point, but I think the following lines in _ftp_cwd() should take care of multiple slashes: while (*beg == '/') ++beg, ++i;