cURL / Mailing Lists / curl-users / Single Mail

curl-users

AW: HTTPS POST via proxy - no data is sent to remote server

From: Axel Kuhn epidox <axel.kuhn_at_epidox.de>
Date: Tue, 3 Mar 2009 19:35:33 +0100

Hello Daniel,

first of all thank you very much for your very quick reply. Your work-around
is fine - uploading the file is now possible without any problems. See the
corresponding dump for details below.

However there is one question left: It is possible to reduce the content of
the cURL trace file to a minimum by means of a trace level or something
similar? I cannot find anything in the documentation. Reason: The only thing
what I want to do after reading the trace file is to investigate that the
upload has been executed successfully (and I want to do this in an automated
way).

Thank you in advance.

Kind regards,
Axel

************************************************************************
== 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 Basic with user ''
=> Send header, 268 bytes (0x10c)
0000: CONNECT +++++.+++++.de:443 HTTP/1.0
0031: Host: +++++.+++++.de:443
0057: Proxy-Authorization: Basic Og==
0078: User-Agent: curl/7.19.2 (i386-pc-win32) libcurl/7.19.2 OpenSSL/0
00b8: .9.8g zlib/1.2.3
00ca: Proxy-Connection: Keep-Alive
00e8: Content-Type: application/x-CIDX
010a:
<= 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

...

== Info: SSL certificate verify ok.
=> Send header, 242 bytes (0xf2)
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: 5772
00da: Expect: 100-continue
00f0:
<= 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: Tue, 03 Mar 2009 16:56:15 GMT
=> Send data, 5772 bytes (0x168c)

...

<= Recv header, 17 bytes (0x11)
0000: HTTP/1.1 200 OK
<= Recv header, 27 bytes (0x1b)
0000: Server: Microsoft-IIS/5.0
<= Recv header, 37 bytes (0x25)
0000: Date: Tue, 03 Mar 2009 16:56:15 GMT
<= Recv header, 19 bytes (0x13)
0000: Content-Length: 0
<= Recv header, 25 bytes (0x19)
0000: Content-Type: text/html
<= Recv header, 67 bytes (0x43)
0000: Set-Cookie: ASPSESSIONIDCQDBQSRC=CPIPOGBCMNEIBCCCEMMNLEIK; path=
0040: /
<= Recv header, 24 bytes (0x18)
0000: Cache-control: private
<= Recv header, 2 bytes (0x2)
0000:
== 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: ..
************************************************************************

-----Ursprüngliche Nachricht-----
Von: curl-users-bounces_at_cool.haxx.se
[mailto:curl-users-bounces_at_cool.haxx.se] Im Auftrag von Daniel Stenberg
Gesendet: Dienstag, 3. März 2009 13:12
An: the curl tool
Betreff: Re: HTTPS POST via proxy - no data is sent to remote server

On Tue, 3 Mar 2009, Axel Kuhn epidox wrote:

> 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

This is funny. You specify NTLM but the proxy clearly just let you through
without it.

> 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?

I think it is a bug. libcurl will use content-length 0 for the NTLM auth
phase
and judging from your protocol dump here I think it wrongly uses that even
though it got no 407 response. I'll need to setup a little test case a
see...

A work-around for you is to simply not specify --proxy-ntlm since the proxy
obviously doesn't care!

-- 
  / 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
-------------------------------------------------------------------
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