cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: question on https through proxy

From: <RBramante_at_on.com>
Date: Fri, 4 Oct 2002 10:59:32 -0400

Here is what I got. Included the http and https for comparison. They are
more different then I thought they would be. The https seems to hang
indefinitely and I had to use a timeout command.

http:

== Info: About to connect() to 127.0.0.1:8000
== Info: Connected to 127.0.0.1 (127.0.0.1) port 8000
=> Send header, 228 bytes (0xe4)
0000: 47 45 54 20 68 74 74 70 3a 2f 2f 32 30 37 2e 31 GET http://207.1
0010: 38 2e 32 31 39 2e 32 31 34 3a 38 30 38 30 2f 68 8.219.214:8080/h
0020: 65 6c 6c 6f 2e 68 74 6d 6c 20 48 54 54 50 2f 31 ello.html HTTP/1
0030: 2e 31 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 .1..User-Agent:
0040: 63 75 72 6c 2f 37 2e 39 2e 38 20 28 77 69 6e 33 curl/7.9.8 (win3
0050: 32 29 20 6c 69 62 63 75 72 6c 20 37 2e 39 2e 38 2) libcurl 7.9.8
0060: 20 28 4f 70 65 6e 53 53 4c 20 30 2e 39 2e 36 64 (OpenSSL 0.9.6d
0070: 29 0d 0a 48 6f 73 74 3a 20 32 30 37 2e 31 38 2e )..Host: 207.18.
0080: 32 31 39 2e 32 31 34 3a 38 30 38 30 0d 0a 50 72 219.214:8080..Pr
0090: 61 67 6d 61 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a agma: no-cache..
00a0: 41 63 63 65 70 74 3a 20 69 6d 61 67 65 2f 67 69 Accept: image/gi
00b0: 66 2c 20 69 6d 61 67 65 2f 78 2d 78 62 69 74 6d f, image/x-xbitm
00c0: 61 70 2c 20 69 6d 61 67 65 2f 6a 70 65 67 2c 20 ap, image/jpeg,
00d0: 69 6d 61 67 65 2f 70 6a 70 65 67 2c 20 2a 2f 2a image/pjpeg, */*
00e0: 0d 0a 0d 0a ....
<= Recv header, 17 bytes (0x11)
0000: 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d HTTP/1.1 200 OK.
0010: 0a .
<= Recv header, 28 bytes (0x1c)
0000: 45 54 61 67 3a 20 57 2f 22 35 30 2d 31 30 33 33 ETag: W/"50-1033
0010: 37 34 32 37 30 38 39 33 38 22 0d 0a 742708938"..
<= Recv header, 46 bytes (0x2e)
0000: 4c 61 73 74 2d 4d 6f 64 69 66 69 65 64 3a 20 46 Last-Modified: F
0010: 72 69 2c 20 30 34 20 4f 63 74 20 32 30 30 32 20 ri, 04 Oct 2002
0020: 31 34 3a 34 35 3a 30 38 20 47 4d 54 0d 0a 14:45:08 GMT..
<= Recv header, 25 bytes (0x19)
0000: 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 Content-Type: te
0010: 78 74 2f 68 74 6d 6c 0d 0a xt/html..
<= Recv header, 20 bytes (0x14)
0000: 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 Content-Length:
0010: 35 30 0d 0a 50..
<= Recv header, 37 bytes (0x25)
0000: 44 61 74 65 3a 20 46 72 69 2c 20 30 34 20 4f 63 Date: Fri, 04 Oc
0010: 74 20 32 30 30 32 20 31 34 3a 34 36 3a 32 36 20 t 2002 14:46:26
0020: 47 4d 54 0d 0a GMT..
<= Recv header, 48 bytes (0x30)
0000: 53 65 72 76 65 72 3a 20 41 70 61 63 68 65 20 43 Server: Apache C
0010: 6f 79 6f 74 65 20 48 54 54 50 2f 31 2e 31 20 43 oyote HTTP/1.1 C
0020: 6f 6e 6e 65 63 74 6f 72 20 5b 31 2e 30 5d 0d 0a onnector [1.0]..
<= Recv data, 50 bytes (0x32)
0000: 3c 68 74 6d 6c 3e 0d 0a 3c 62 6f 64 79 3e 0d 0a <html>..<body>..
0010: 3c 68 31 3e 48 65 6c 6c 6f 3c 2f 68 31 3e 0d 0a <h1>Hello</h1>..
0020: 3c 2f 62 6f 64 79 3e 0d 0a 3c 2f 68 74 6d 6c 3e </body>..</html>
0030: 0d 0a ..
== Info: Connection #0 left intact

https:

== Info: About to connect() to 127.0.0.1:8000
== Info: Connected to 127.0.0.1 (127.0.0.1) port 8000
== Info: Establish HTTP proxy tunnel to 207.18.219.214:8443
=> Send data , 103 bytes (0x67)
0000: 43 4f 4e 4e 45 43 54 20 32 30 37 2e 31 38 2e 32 CONNECT 207.18.2
0010: 31 39 2e 32 31 34 3a 38 34 34 33 20 48 54 54 50 19.214:8443 HTTP
0020: 2f 31 2e 30 0d 0a 55 73 65 72 2d 41 67 65 6e 74 /1.0..User-Agent
0030: 3a 20 63 75 72 6c 2f 37 2e 39 2e 38 20 28 77 69 : curl/7.9.8 (wi
0040: 6e 33 32 29 20 6c 69 62 63 75 72 6c 20 37 2e 39 n32) libcurl 7.9
0050: 2e 38 20 28 4f 70 65 6e 53 53 4c 20 30 2e 39 2e .8 (OpenSSL 0.9.
0060: 36 64 29 0d 0a 0d 0a 6d)....
<= Recv data, 36 bytes (0x24)
0000: 48 54 54 50 2f 31 2e 30 20 32 30 30 20 43 6f 6e HTTP/1.0 200 Con
0010: 6e 65 63 74 69 6f 6e 20 65 73 74 61 62 6c 69 73 nection establis
0020: 68 65 64 0a hed.
<= Recv data, 22 bytes (0x16)
0000: 50 72 6f 78 79 2d 41 67 65 6e 74 3a 20 49 4a 2f Proxy-Agent: IJ/
0010: 32 2e 30 2e 32 0a 2.0.2.
<= Recv data, 1 bytes (0x1)
0000: 0a .
== Info: Closing connection #0

On Thu, 3 Oct 2002 RBramante_at_on.com wrote:
> Hi, I'm trying to debug a problem with an https connection through a
proxy.
> Not sure if it is a curl issue or proxy issue, looking for any ideas.
> http connection through the proxy works fine and an https connection
from
> ie works fine, but https from curl hangs.
>
> proxy output from ie connection says:
>
> accept connection ... scan: User-Agent: Mozilla/4.0 (compatible; MSIE
6.0;
> Windows NT 5.0) default
> scan: Host: 207.18.219.214:8443
> scan: Content-Length: 0
> scan: Proxy-Connection: Keep-Alive crunch!
> scan: Pragma: no-cache
> GPC 207.18.219.214:8443
> connect to: 207.18.219.214:8443 ... OK
> <data follows>
Ok, these 'scan' lines that the proxy logs, they must be headers in the IE

request, right?
> proxy putput from curl connection says:
>
> accept connection ... scan: User-Agent: curl/7.9.8 (win32) libcurl 7.9.8

> (OpenSSL 0.9.6d) default
> GPC 207.18.219.214:8443
> connect to: 207.18.219.214:8443 ... OK
... and why doesn't it mention the Host: line or the Pragma: line for the
curl command? It does get the user-agent and then goes straight to the
connect...
> * About to connect() to 127.0.0.1:8000
> * Connected to 127.0.0.1 (127.0.0.1) port 8000
> * Establish HTTP proxy tunnel to 207.18.219.214:8443
This line is written just before curl issues the CONNECT request to the
proxy, which according to the proxy log above seems to do fine.
> And the connection just seems to hang. https to the server from curl
> bypassing the proxy also works, so it seems to be a specific interaction

> between curl and this proxy using https.
What if you use the --trace option, can you see if you ever get anything
back
from the proxy after the CONNECT has been sent off? If so, what does it
return.

-- 
 Daniel Stenberg -- curl related mails on curl related mailing lists 
please
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-10-04