cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Http response with ssl curl from YouTube

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 28 Apr 2015 14:25:08 +0200 (CEST)

On Tue, 28 Apr 2015, Yi Min Yang wrote:

> curl --proto =http --proto-redir =http --user-agent "Mozilla/5.0 (Windows
> NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90
> Safari/537.36" -L -x http://foo.bar.proxy.com:8080
> http://youtube.com/watch?v=youtubevideolink > test.html
>
> This one returns a “curl: (1) Protocol “https” not supported or disabled in
> libcurl”. I believe this error is wrong as curl –version shows https.

If you add -v I think you'll see a redirect to HTTPS there. And you explicitly
tell curl to only allow redirects to HTTP.

> This one works but the response / content of my test.html contains https
> links which I do not want.

curl simply outputs what the server sends.

> Is it possible to get a http response?

Ask your server operator about that.

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-04-28