cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Unable to send GET request via proxy tunnel

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 20 Feb 2014 09:41:47 +0100 (CET)

On Tue, 18 Feb 2014, wrote:

> I'm trying to send GET request through proxy using tunnelling.
> Expected behaviour:
> 1. Tunnel over proxy is created.
> 2. GET request is sent via tunnel.

Sorry, but that's exactly what happens for me when I try your program.

The debug output of the beginning looks like this:

* STATE: INIT => CONNECT handle 0x1ffde78; line 1026 (connection #-5000)
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* STATE: CONNECT => WAITCONNECT handle 0x1ffde78; line 1073 (connection #0)
* Connected to 127.0.0.1 (127.0.0.1) port 80 (#0)
* Establish HTTP proxy tunnel to curl.haxx.se:80
* Proxy auth using Basic with user '123'
> CONNECT curl.haxx.se:80 HTTP/1.1
Proxy-Authorization: Basic MTIzOjEyMw==
Proxy-Connection: Keep-Alive
Host: curl.haxx.se:80

* STATE: WAITCONNECT => WAITPROXYCONNECT handle 0x1ffde78; line 1183
(connection #0)
< HTTP/1.0 200 Connection Established
< Proxy-agent: Apache/2.4.7 (Debian)
<
* Proxy replied OK to CONNECT request
* STATE: WAITPROXYCONNECT => WAITCONNECT handle 0x1ffde78; line 1148
(connection #0)
* STATE: WAITCONNECT => DO handle 0x1ffde78; line 1192 (connection #0)
> GET /download/curl-7.35.0.tar.gz HTTP/1.1
Accept: */*
Host: curl.haxx.se:80

* STATE: DO => DO_DONE handle 0x1ffde78; line 1278 (connection #0)
* STATE: DO_DONE => WAITPERFORM handle 0x1ffde78; line 1404 (connection #0)
* STATE: WAITPERFORM => PERFORM handle 0x1ffde78; line 1417 (connection #0)
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 200 OK
< Date: Thu, 20 Feb 2014 08:41:05 GMT
* Server Apache/2.4.6 (Debian) is not blacklisted
< Server: Apache/2.4.6 (Debian)
< Last-Modified: Wed, 29 Jan 2014 07:10:26 GMT
< ETag: "3615b0-4f116a2a19457"
< Accept-Ranges: bytes
< Content-Length: 3544496
< Content-Type: application/x-gzip
<
* STATE: PERFORM => DONE handle 0x1ffde78; line 1587 (connection #0)
* Connection #0 to host 127.0.0.1 left intact

....

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-02-20