[EMAIL PROTECTED] (Fran�ois Pons) writes:

> parag shah <[EMAIL PROTECTED]> writes:
> 
> > since list is reporting long standing failure of using curl for updates
> > here is my problem. 
> > 
> > #urpmi.update sun
> > examining synthesis file [/var/lib/urpmi/synthesis.hdlist.contrib.cz]
> > retrieving description file of "sun"...
> > ...retrieving failed: curl failed: exited with 19 or signal 0
> > 
> > it does work using wget. 
> 
> You use a specific url with user authentification ? Can you give me the url used
> please ?

Ok, so it works with current curl by changing the second / by %2f

like curl ftp://user:[EMAIL PROTECTED]/%2ftmp/A

which works with wget also.

or by using ftp://user:[EMAIL PROTECTED]///tmp/A with curl compiled with this patch :
--- curl-7.10.6-pre4/lib/ftp.c.fpons    2003-07-24 18:09:57.000000000 +0200
+++ curl-7.10.6-pre4/lib/ftp.c  2003-07-24 18:19:02.000000000 +0200
@@ -2134,12 +2134,15 @@
 
   /* parse the URL path into separate path components */
   while((slash_pos=strchr(cur_pos, '/'))) {
+    /* 1 or 0 to indicate absolute directory */
+    int absolute_dir = cur_pos - conn->ppath > 1 && path_part == 0;
     /* seek out the next path component */
     if (slash_pos-cur_pos) {
       /* we skip empty path components, like "x//y" since the FTP command CWD
          requires a parameter and a non-existant parameter a) doesn't work on
          many servers and b) has no effect on the others. */
-      ftp->dirs[path_part] = curl_unescape(cur_pos,slash_pos-cur_pos);
+      ftp->dirs[path_part] = curl_unescape(cur_pos-absolute_dir,
+                                          slash_pos-cur_pos+absolute_dir);
     
       if (!ftp->dirs[path_part]) { /* run out of memory ... */
         failf(data, "no memory");

which I hesitate to upload since /// is not very natural, it will force us to
allow // and change test106 of curl.

Fran�ois.

Reply via email to