curl / Mailing Lists / curl-library / Single Mail


Re: Hi, I've a question about libcurl and proxy

From: Daniel Stenberg via curl-library <>
Date: Mon, 24 Sep 2018 23:24:39 +0200 (CEST)

On Mon, 24 Sep 2018, Kuan-Sheng Chen via curl-library wrote:

> I'm doing this is by making sure that libcurl has finished it's http
> tunneling with the proxy, so if there's an error after that, I would make it
> a server error, and vice versa.

Tunneling you say, so you're doing a CONNECT through a http proxy, right?
Isn't a "server error" then the response code to that CONNECT request?

> The problem now I'm facing is that the only way to get the http tunneling
> messages is throw enabling CURLOPT_VERBOSE, and to check these Verbose
> message in a coding way I dumped it to a file with CURLOPT_STDERR, and
> checked it line by line so as to "observer" the operation of http tunneling.

At the very least you can use the DEBUGFUNCTION and get all those messages fed
directly into your callback. There's no need to redirect to a file or similar.

Received on 2018-09-24