curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: http_proxy environment variable

From: Colin Ngam via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 13 Sep 2018 14:09:36 +0000

On 9/13/18, 8:28 AM, "Daniel Stenberg" <daniel_at_haxx.se> wrote:

    On Thu, 13 Sep 2018, Colin Ngam wrote:

> Yes, you are right. The curl command works but if I write a test program
> using libcurl, libcurl does not automatically look for the variable. See
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcurl.haxx.se%2Flibcurl%2Fc%2FCURLOPT_PROXY.html&amp;data=02%7C01%7CColin.Ngam%40Quantum.Com%7Cafa5af7ecf7a4a6bdc1b08d6197cc6b7%7C322a135f14fb4d72aede122272134ae0%7C1%7C0%7C636724421035434605&amp;sdata=pBU5MyTaFqPlD5O1ZQk8c7PsJK99nZLqGYZzemta6JE%3D&amp;reserved=0

    Those verbose lines my test shows comes from the library. So yes, it *does*
    look for the variable. Can we perhaps change the game and you instead show us
    your code for which it doesn't work?

    See it working with libcurl:

    $ cd docs/examples && make -sj
    $ http_proxy=foo:9999 ./simple
    curl_easy_perform() failed: Couldn't resolve proxy name
    $ http_proxy=localhost:80 ./simple
    [lots of HTML output]

    (since I run a proxy on localhost port 80)

    --

      / daniel.haxx.se

Thanks Daniel. I found my issue. The deamon that handles the IO was created prior to setting the http_proxy.

Colin

The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum. Quantum reserves the right to have electronic communications, including email and attachments, sent across its networks filtered through security software programs and retain such messages in order to comply with applicable data security and retention requirements. Quantum is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-09-13