cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Problems thru a proxy.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 2 Jul 2008 21:57:46 +0200 (CEST)

On Wed, 2 Jul 2008, David Shields wrote:

> My App conversation goes like this:
> -----------------------------------
> CONNECT www.google.co.uk:80 HTTP/1.0

> note the CONNECT request through tunnel, rather than the GET as with the
> browser.
>
> The curl error is "56 Received HTTP code 403 from proxy after CONNECT"

Yes, most proxies are setup to refuse CONNECT to other ports than 443.

> Why is my app doing a CONNECT, and the browser doing a GET www.google.co.uk
> ?

> $r=curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);

Because you asked for CURLOPT_HTTPPROXYTUNNEL.

-- 
  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-07-02