cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Proxy

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 5 Feb 2009 22:15:42 +0100 (CET)

On Thu, 5 Feb 2009, Michel RIGAUD wrote:

> I still can't get thru the proxy
> with the command curl -U user:password -x proxy:port
> I get a 404

404 is weird. That's a "page not found" response from a server, not a proxy.

> with this curl -U user:password -x proxy:port
> --proxy-[digest/basic/negotiate/ntlm/any] [URL]
> I get what follows

> 0000: Content-type: application/x-ns-proxy-autoconfig

...

> 0000: // Automatic Proxy Configuration File.// Last update: 20081014./
> 0040: / Location: http://mcd-server/mcd/proxy.pac..function FindProxyF
> 0080: orURL(url, host).{..if (isPlainHostName(host))...return "DIRECT"
> 00c0: ;..else if (dnsDomainIs(host, "www.bms.com"))...return "PROXY pr
> 0100: oxy-server:8080; PROXY proxybk-server:8080";..else if (dnsDomain
> 0140: Is(host, "www-preview.bms.com"))...return "PROXY proxy-server:80

Uh, that's a 200 OK.

But what you see there is a PAC page, which is used to tell browsers what
proxy to use for what host name. See

         http://en.wikipedia.org/wiki/Proxy_auto-config

You can probably read it and based on what URL you want to fetch use the proxy
that the javascript in there would pick.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-02-05