curl-users
Not reuse of connection for FTP Request under HTTP Proxy
Date: Thu, 18 Oct 2007 12:58:15 -0300
When i try to make a ftp get or upload using the win32 curl 7.17.0 this
close the conection after http proxy response, not reusing the current
connection.
I do not test curl 7.17.0 under linux.
The line of command used was :
curl -T "{file.txt,}" -# --proxy x.x.x.x:xxxx --proxy-user xxxx
--proxy-ntlm ftp://xxxx:xxxx@x.x.x.x/
Output was :
* About to connect() to proxy x.x.x.x port xxxx (#0)
* Trying x.x.x.x... connected
* Connected to x.x.x.x (x.x.x.x) port xxxx (#0)
* Proxy auth using NTLM with user 'xxxx'
* Server auth using Basic with user 'xxxx'
> PUT ftp://xxxx:xxxx@x.x.x.x/test%2Etxt HTTP/1.1
> Proxy-Authorization: NTLM XXXX=
> Authorization: Basic xxxx==
> User-Agent: curl/7.17.0 (i586-pc-mingw32msvc) libcurl/7.17.0
OpenSSL/0.9.8e zlib/1.2.2
> Host: x.x.x.x:21
> Pragma: no-cache
> Accept: */*
> Proxy-Connection: Keep-Alive
> Content-Length: 0
> Expect: 100-continue
>
< HTTP/1.1 407 Proxy Authentication Required
< Proxy-Authenticate: NTLM XXXXX
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Type: text/html; charset=utf-8
< Proxy-Connection: Keep-Alive
< Set-Cookie: BCSI-CS0A11A991=2; Path=/
< Connection: Keep-Alive
< Content-Length: 1742
<
0,0%*
Closing connection #0
* Issue another request to this URL: 'ftp://xxxx:xxxx@x.x.x.x/
test%2Etxt'
* About to connect() to proxy x.x.x.x port xxxx (#0)
* Trying x.x.x.x... connected
* Connected to x.x.x.x (x.x.x.x) port 8080 (#0)
* Proxy auth using NTLM with user 'xxxx'
* Server auth using Basic with user 'xxxx'
> PUT ftp://xxxx:xxxx@x.x.x.x/test%2Etxt HTTP/1.1
> Proxy-Authorization: NTLM XXXX=
> Authorization: Basic xxxx==
> User-Agent: curl/7.17.0 (i586-pc-mingw32msvc) libcurl/7.17.0
OpenSSL/0.9.8e zlib/1.2.2
> Host: x.x.x.x:21
> Pragma: no-cache
> Accept: */*
> Proxy-Connection: Keep-Alive
> Content-Length: 0
> Expect: 100-continue
>
This loop until request # 50
I tried this now using a linux and win32 curl 7.15.x and works fine.
Output was :
About to connect() to proxy x.x.x.x
.x port xxxx
* Trying x.x.x.x... connected
* Connected to x.x.x.x (x.x.x.x) port xxxx
* Proxy auth using NTLM with user 'xxxx'
* Server auth using Basic with user 'xxxx'
> PUT ftp://xxxx:xxxx@x.x.x.x/test%2Etxt HTTP/1.
1
> Proxy-Authorization: NTLM xxxx==
> Authorization: Basic xxxx==
> User-Agent: curl/7.15.4 (i586-pc-mingw32msvc) libcurl/7.15.4
OpenSSL/0.9.8e zlib/1.2.2
> Host: x.x.x.x:21
> Pragma: no-cache
> Accept: */*
> Proxy-Connection: Keep-Alive
> Content-Length: 0
> Expect: 100-continue
>
< HTTP/1.1 407 Proxy Authentication Required
< Proxy-Authenticate: NTLM xxxx=
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Type: text/html; charset=utf-8
< Proxy-Connection: Keep-Alive
< Set-Cookie: BCSI-CS0A11A991=2; Path=/
< Connection: Keep-Alive
< Content-Length: 1742
* Ignoring the response-body
########################################################################
100,0%*
Connection #0 to host x.x.x.x left intact
* Issue another request to this URL: 'ftp://xxxx:xxxx@x.x.x.x/test%2Etxt'
* Re-using existing connection! (#0) with host x.x.x.x
* Connected to x.x.x.x (x.x.x.x) port xxxx
* Proxy auth using NTLM with user 'xxxx'
* Server auth using Basic with user 'xxxx'
> PUT ftp://xxxx:xxxx@x.x.x.x/test%2Etxt HTTP/1.
1
> Proxy-Authorization: NTLM xxxx
> Authorization: Basic xxxx==
> User-Agent: curl/7.15.4 (i586-pc-mingw32msvc) libcurl/7.15.4
OpenSSL/0.9.8e zlib/1.2.2
> Host: x.x.x.x:21
> Pragma: no-cache
> Accept: */*
> Proxy-Connection: Keep-Alive
> Content-Length: 11
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
HTTP/1.1 200 OK
< Content-Type: text/plain
< Content-length: 24
< Proxy-Connection: Keep-Alive
< Connection: Keep-Alive
< Date: Thu, 18 Oct 2007 15:38:44 GMT
226 Transfer complete.
At this time the request works fine... the diference here is when proxy
returns the first response. The response body is ignored and the
connection is not closed, is reused.
I tried with all 7.17.0 binary builds for Win32 generic with SSL support.
Thanks in advance.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit
written agreement or government initiative expressly permitting the use of
e-mail for such purpose.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Received on 2007-10-18