cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: FTP and HTTPs sessions simultaniously. Is it possible?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 27 May 2011 15:09:49 +0200 (CEST)

On Fri, 27 May 2011, Mykyta Dorokhin wrote:

> Is it possible to run FTP and HTTPs (probably over proxy) sessions in
> one application each in a separate thread?

Yes, sure!

> I'm asking because I cannot fully understand the description of the
> CURLOPT_PROXY option
> http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTPROXY which
> says that: "...libcurl will transparently convert operations to HTTP
> even if you specify an FTP URL etc".

If you do regular FTP requests and you use a HTTP proxy, libcurl will
transparently make those requests with HTTP (passing in FTP URLs). There's no
way to do "proper" FTP over HTTP proxy unless you "tunnel through" the proxy
with the CONNECT request but few proxies allow that through to the standard
ftp server port.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-27