cURL / Mailing Lists / curl-users / Single Mail

curl-users

cURL 7.10.3 HTTP download and --location not working

From: Tony Blakie <Tony.Blakie_at_mi-services.com>
Date: Fri, 21 Nov 2003 14:36:31 -0000

We're using the following cURL command (I've censored sensitive values, i.e. IP addresses, user Ids and passwords):

curl \
--include \
--show-error \
--location \
--verbose \
--stderr /tmp/stderr.log \
--trace-ascii /tmp/trace.log \
--proxy ProxyIP:ProxyPort \
--proxy-user joe:bloggs \
--output /tmp/himport.$$.file1 \
--user fred:smith \
http://machine:2003/virtual_directory/target.htm

and getting the following results:

- Resulting /tmp/trace.log:

== Info: About to connect() to ProxyIP:ProxyPort
== Info: Connected to ProxyIP (ProxyIP) port ProxyPort
=> Send header, 400 bytes (0x190)
0000: GET http://machine:2003/virtual_directory/target.htm HT
0040: TP/1.1
0048: Proxy-authorization: Basic LnR5YTIuc3N1LnR5aC5nbGEuY2ljYTpzdW1tZ
0088: XIyMDAw
0091: Authorization: Basic Y2ljYXVzZXI6Y2ljYXVzZXI=
00c0: User-Agent: curl/7.10.3 (sparc-sun-solaris2.8) libcurl/7.10.3 Op
0100: enSSL/0.9.6g zlib/1.1.4
0119: Host: machine:2003
013a: Pragma: no-cache
014c: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
018e:
<= Recv header, 32 bytes (0x20)
0000: HTTP/1.1 302 Moved Temporarily
<= Recv header, 21 bytes (0x15)
0000: Content-Length: 964
== Info: transfer closed with 964 bytes remaining to read
== Info: Closing connection #0

- Resulting /tmp/stderr.log:

  % Total % Received % Xferd Average Speed Time Curr.
                                 Dload Upload Total Current Left Speed

  0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
  0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0
  0 964 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0
  0 964 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0

- Resulting /tmp/himport...file1:

HTTP/1.1 302 Moved Temporarily Content-Length: 964

Questions:
Does anyone know why the location switch doesn't seem to be routing on the request from the URL to the actual physical location?
Is it a version issue? Is there a switch we're missing or shouldn't be using? Is there a specific order in which the switches should be used?
Any help would be appreciated...

Thanks in advance

Tony

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Received on 2003-11-21