cURL / Mailing Lists / curl-users / Single Mail


Re: strange proxy related curl error on mac os x

From: Alessandro Vesely <>
Date: Thu, 25 Oct 2007 16:18:57 +0200

Henning Grote wrote:
> whlie trying to use MoodBlast <> I stumbled
> upon a curl error, which I was unable to resolve myself.
> (I am not a *nix geek and this is my first post to curl-users, please be
> patient)

And I barely know Applescript...

Your post would have been clearer to many if you opened a
window (usually in Applications/Utility), issued the relevant command
line there, and copy and pasted results here. Besides, that may give
you more clues about how your environment is set.

> Setup:
> [...]
> Mac OS 10.4.10
> curl 7.13.1 (powerpc-apple-darwin8.0) libcurl/7.13.1 OpenSSL/0.9.7l zlib/1.2.3
> [...]
> global twitter_login
> set twitter_login to "twitter_username:passwort" -- replace with your info
> my set_twitter("testing%20from%20Applescript") -- you can edit the quoted paramater, just url escape it
> on set_twitter(status)
> set the_status to quoted form of ("status=" & status)
> try
> global twitter_login
> set twitter_results to do shell script "curl --user " & twitter_login & " --data-binary " & the_status & ""
> [...]
> on error msg
> return {false, "Retrieve error:" & msg}
> end try
> end set_twitter
> The Script outputs the following error message:
> {false, "Retrieve error:
> curl: (5) Couldn't resolve proxy ''"}

So that command line failed.

> The same script reports success, when run under the Admin account.
> The funny thing is: I have a blank .curlrc in my home directory, (not
> the admin account). The proxy mentioned in the error message is one from
> a long deleted network location. Neither in my current network location
> nor in any other network location is a proxy defined (checked that more
> than once)

You may add a an option

   --proxy ''

to override any *_PROXY environment variable. E.g. build the command line as

   set twitter_results to do shell script "curl --proxy '' --user " & etc...

> From which locations does curl get informations about which proxies to
> use - other than .curlrc? There must be some other config-files in my
> home directory where curl gets the outdated information about the proxy.

Perhaps .netrc in CURL_HOME or HOME?

> And, regarding the blank .curlrc, what would be the correct syntax in
> the .curlrc to force curl to use no proxy?
> I tried NO_PROXY=*, NO_PROXY="*" but got error messages both times (told
> you, I am not a geek ;-)

Where do you set that? In ~/.MacOSX/environment.plist?
You can also set environment variables before the command, e.g.

   set twitter_results to do shell script "export NO_PROXY='*'; curl --user " & etc...
Received on 2007-10-25