curl-users
HTTPS POST via proxy - no data is sent to remote server
Date: Tue, 3 Mar 2009 13:00:01 +0100
Hello,
I am trying to upload a file with "HTTPS POST" using the curl command line
tool.
Doing this without a proxy it works fine, but when using a proxy the result
is
not as expected.
I am using curl/7.19.2 with OpenSSL/0.9.8g.
Command line:
curl.exe --data-binary @data.txt --proxy-ntlm -x hbgdisa02.*****.com:80 -U :
-H "Content-Type: application/x-CIDX"
https://+++++.+++++.de/*****/upload.asp
--trace-ascii send.log
See the following log for details:
***************************************************************************
== Info: About to connect() to proxy hbgdisa02.*****.com port 80 (#0)
== Info: Trying 169.129.159.190... == Info: connected
== Info: Connected to hbgdisa02.*****.com (169.129.159.190) port 80 (#0)
== Info: Establish HTTP proxy tunnel to +++++.+++++.de:443
== Info: Proxy auth using NTLM with user ''
=> Send header, 307 bytes (0x133)
0000: CONNECT +++++.+++++.de:443 HTTP/1.0
0031: Host: +++++.+++++.de:443
0057: Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAA
0097: AAAAA=
009f: User-Agent: curl/7.19.2 (i386-pc-win32) libcurl/7.19.2 OpenSSL/0
00df: .9.8g zlib/1.2.3
00f1: Proxy-Connection: Keep-Alive
010f: Content-Type: application/x-CIDX
0131:
<= Recv header, 37 bytes (0x25)
0000: HTTP/1.1 200 Connection established
<= Recv header, 20 bytes (0x14)
0000: Via: 1.1 HBGDISA02
<= Recv header, 24 bytes (0x18)
0000: Connection: Keep-Alive
<= Recv header, 30 bytes (0x1e)
0000: Proxy-Connection: Keep-Alive
<= Recv header, 2 bytes (0x2)
0000:
== Info: Proxy replied OK to CONNECT request
***************************************************************************
Now the TLS handshake is executed successfully.
And now the file upload should be performed...
***************************************************************************
== Info: SSL certificate verify ok.
=> Send header, 217 bytes (0xd9)
0000: POST /*****/upload.asp HTTP/1.1
0021: User-Agent: curl/7.19.2 (i386-pc-win32) libcurl/7.19.2 OpenSSL/0
0061: .9.8g zlib/1.2.3
0073: Host: +++++.+++++.de
0095: Accept: */*
00a2: Content-Type: application/x-CIDX
00c4: Content-Length: 0
00d7:
<= Recv header, 23 bytes (0x17)
0000: HTTP/1.1 100 Continue
<= Recv header, 27 bytes (0x1b)
0000: Server: Microsoft-IIS/5.0
<= Recv header, 37 bytes (0x25)
0000: Date: Mon, 02 Mar 2009 19:14:07 GMT
<= Recv header, 29 bytes (0x1d)
0000: HTTP/1.1 406 Not Acceptable
<= Recv header, 27 bytes (0x1b)
0000: Server: Microsoft-IIS/5.0
<= Recv header, 37 bytes (0x25)
0000: Date: Mon, 02 Mar 2009 19:14:07 GMT
<= Recv header, 21 bytes (0x15)
0000: Content-Length: 255
<= Recv header, 25 bytes (0x19)
0000: Content-Type: text/html
<= Recv header, 67 bytes (0x43)
0000: Set-Cookie: ASPSESSIONIDCQDBQSRC=APIPOGBCMDEKNCMNHFEFPCPP; path=
0040: /
<= Recv header, 24 bytes (0x18)
0000: Cache-control: private
<= Recv header, 2 bytes (0x2)
0000:
<= Recv data, 155 bytes (0x9b)
0000: Content-type or Entity body is missing
0028: Message headers follow below:
0047: Accept: */*
0054: Host: +++++.+++++.de
0076: User-Agent: curl/7.19.2 (i386-pc-win3
<= Recv data, 100 bytes (0x64)
0000: 2) libcurl/7.19.2 OpenSSL/0.9.8g zlib/1.2.3
002d: Content-Length: 0
0040: Content-Type: application/x-CIDX
0062:
== Info: Connection #0 to host hbgdisa02.*****.com left intact
== Info: Closing connection #0
== Info: SSLv3, TLS alert, Client hello (1):
=> Send SSL data, 2 bytes (0x2)
0000: ..
***************************************************************************
Unfortunately no data is sent to the remote server. I assume this is due to
line "00c4: Content-Length: 0".
So my question is: Why is content-length equal to 0?
- Is this a bug within curl?
- Is this a problem with the proxy?
The log file containing the successful file upload (without using the proxy)
incorporates in addition a send command ("=> Send data") after the POST.
In addition the content length is not equal to 0 but contains the length of
the XML message.
Thank you in advance.
Kind regards,
Axel Kuhn
-------------------------------------------------------------------
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-03-03