diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2001-05-10 09:31:48 +0000 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2001-05-10 09:31:48 +0000 | 
| commit | 7be8993f9429db4cd3633cce941d066922c25189 (patch) | |
| tree | dfc9a215134654ccfab2d8c471fc33db4c59455e /lib | |
| parent | bad4c8967bf0dc01853fa0b46338f95d26b5f505 (diff) | |
When re-using a connection, the path pointers were not setup properly so
that multiple FTP transfers were not possible
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/url.c | 10 | 
1 files changed, 8 insertions, 2 deletions
@@ -2022,14 +2022,20 @@ static CURLcode Connect(struct UrlData *data,      if(old_conn->proxyhost)        free(old_conn->proxyhost);      conn = conn_temp;        /* use this connection from now on */ -    free(conn->path);        /* free the previous path pointer */      /* we need these pointers if we speak over a proxy */      conn->name = conn->gname;      conn->hostname = old_conn->gname;      conn->path = path;       /* use this one */ -    conn->ppath = path;      /* set this too */ + +    /* The 'ppath' may have been advanced a few steps from the 'path' start +       point. We must also advance our new pointer as many steps as the +       previous one was! This was the cause of the multiple ftp file bug +       found on May 9 2001 libcurl 7.7.3 */ +    conn->ppath = (old_conn->ppath - old_conn->path)+path; + +    free(old_conn->path);    /* free the previous path pointer */      /* re-use init */      conn->bits.reuse = TRUE; /* yes, we're re-using here */  | 
