cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using libCurl over SSH Tunnel

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 15 Apr 2010 13:54:37 +0200 (CEST)

On Thu, 15 Apr 2010, Jérôme Patey wrote:

> I tried using libssh2 and call the channel_write() instead of swrite(), it
> works fine with HTTP over SSH.
>
> But the problem happens when I want to use HTTPS, it seems that libCurl
> sends data as if it was HTTP, because the server returns an error ("bad
> request, are you using HTTP on when server only understands HTTPS?").

That's probably because your code somehow messed it up. libcurl of course
sends HTTPS data as HTTPS and nothing else, as otherwise it wouldn't work!

Are you perhaps confusing it with doing a tunnel through a proxy with CONNECT
(which tends to be how you do HTTPS through a proxy) using plain HTTP?

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-04-15