cURL / Mailing Lists / curl-library / Single Mail



From: <>
Date: Thu, 01 Nov 2007 15:12:23 +0100


I have a problem with sftp protocol. I downloaded all 5 dlls for
Windows from and I ran a
prepared program and all was ok for http protocol but when I
changed http for sftp, a perform() method returned '1', this is
ERROR_UNSUPPORTED_PROTOCOL. I thing I have dll(s) without sftp support
but I don't know what to do with this.

My source code is:

        CurlGlue cg;

        test cw = null;

                // Register callback write function
                cg = new CurlGlue();

                // this will throw a ERROR_NO_CALLBACK_INSTANCE exception, non-fatal
        try {
                cg.setopt(CURL.OPT_WRITEFUNCTION, cw);
        } catch (CURLException e) {
                System.out.println("Wouldn't have thrown an error if we instantiated
test() first!");

                // we must first instantiate the CurlWrite interface
                cw = new test();

                // set the callback function
                cg.setopt(CURL.OPT_WRITEFUNCTION, cw);
                cg.setopt(CURL.OPT_USERPWD, "user:pass");
        cg.setopt(CURL.OPT_PORT, 22);
        //cg.setopt(CURL.OPT_QUOTE, "RNFR

        //int result = cg.setopt(CURL.OPT_URL, "");
        int result = cg.setopt(CURL.OPT_URL, "sftp://linuxweb/");
        result = cg.perform();

        // clean everything up.

With regards,

Received on 2007-11-01