cURL / Mailing Lists / curl-users / Single Mail

curl-users

Problem with cookie setting for a Tumbleweed ftp server!

From: Saraswatula, Prasanth <prasanth_at_amazon.com>
Date: Wed, 12 Jul 2006 16:58:36 -0700

Hello,
       I am curl client to a Tumbleweed ftp server. The server runs as https and has 3 different dirs at its root level. I am trying to get the directory listing in one of the dirs and my aim is to parse them and get all the files in that dir. In this whole process, I tried different options from curl, but I am not able to get past the intial root level dir listing. The options that I tried are:

1. curl -u usr_name:passwd -L https://fqdn -c cookie_file_name --user-agent "Mozilla/4.0"
        This gave me a html output of what are the directories at the root level. Lets suppose they are a, b and c
2. curl -u usr_name:passwd -L https://fqdn/a -b cookie_file_name --user-agent "Mozilla/4.0"
        This again gives me the same output as above.

        From my RHEL3 box, I have tried sftp client to the same location and I was able to transfer files. I want to automate this whole process.

        One interesting thing that I noticed is, in both the pages, I have some 302 header, saying that the file is moved to '/' location. That is followed by html of the root page in that server. Please let me know what I am doing wrong. I am kind of newbie to cURL (infact 1 day old ;) ). Thanks in advance

Prasanth S.
Received on 2006-07-13