curl-users
Re: curl usage with https
Date: Wed, 3 May 2006 11:07:45 -0700 (PDT)
Dan: the L option and also the -b cookie option
together kind of help me get closer to the solution.
Eventhough I am asking curl to fetch
"/alerts/report/report-alert-99606.xml?attack_id=99606&output=xml"
from the web server, it always returns
https://ipaddress/status/is. In the trace eventhough I
see HTTP/1.1 302 Found for
/alerts/report/report-alert-99606.xm..., it still does
a get for /status/is
==========================================
curl -o report.html -k -v -b newcookies.txt -L -d
"/alerts/report/report-alert-99606.xml?attack_id=99606&output=xml"
"https://199.189.2.132/index?username=user1&password=pass1&Submit=Login"
.
.
/alerts/report/report-alert-99606.xml?attack_id=99606&output=xml<
HTTP/1.1 302 Found
< Date: Wed, 03 May 2006 17:55:02 GMT
< Server: Apache/1.3.29
< P3P: policyref="/w3c/p3p.xml", CP="NOI DSP COR TAIa
OUR NOR UNI"
< X-Powered-By: PHP/4.3.3
* Replaced cookie
PHPSESSID="0d8460cce816b130413b17a05ba0728c" for
domain 199.189.2.132, path /, expire 0
< Set-Cookie:
PHPSESSID=0d8460cce816b130413b17a05ba0728c; path=/
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate,
post-check=0, pre-check=0
< Pragma: no-cache
< Location: /status/is
< Transfer-Encoding: chunked
< Content-Type: text/html
* Ignoring the response-body
% Total % Received % Xferd Average Speed Time
Time Time Current
Dload Upload Total
Spent Left Speed
0 0 0 0 0 0 0 0 --:--:--
--:--:-- --:--:-- 0
* Connection #0 to host 199.189.2.132 left intact
* Issue another request to this URL:
'https://199.189.2.132/status/is'
* Disables POST, goes with GET
* Re-using existing connection! (#0) with host
199.189.2.132
* Connected to 199.189.2.132 (199.189.2.132) port 443
> GET /status/is HTTP/1.1
User-Agent: curl/7.12.2 (sparc-sun-solaris2.9)
libcurl/7.12.2 OpenSSL/0.9.7f zlib/1.1.4
Host: 199.189.2.132
Pragma: no-cache
Accept: */*
Cookie: PHPSESSID=0d8460cce816b130413b17a05ba0728c
< HTTP/1.1 200 OK
< Date: Wed, 03 May 2006 17:55:02 GMT
< Server: Apache/1.3.29
< P3P: policyref="/w3c/p3p.xml", CP="NOI DSP COR TAIa
OUR NOR UNI"
< X-Powered-By: PHP/4.3.3
* Replaced cookie
PHPSESSID="0d8460cce816b130413b17a05ba0728c" for
domain 199.189.2.132, path /, expire 0
< Set-Cookie:
PHPSESSID=0d8460cce816b130413b17a05ba0728c; path=/
< Transfer-Encoding: chunked
< Content-Type: text/html
100 8588 0 8588 0 0 12337 0 --:--:--
--:--:-- --:--:-- 11961
* Connection #0 to host 199.189.2.132 left intact
* Closing connection #0
======================
Any ideas?
Thanks
Ravi
--- Dan Fandrich <dan_at_coneharvesters.com> wrote:
> On Wed, May 03, 2006 at 07:50:18AM -0700, Ravi
> Malghan wrote:
> > It looks like everything is going good with no
> errors.
> > But it still doesn't download the expected file.
> > Wondering if there is anything here that might
> point
> > me to the problem?
> [...]
> > < HTTP/1.1
> > 302 Found
> > < Date: Wed, 03 May 2006 14:38:25 GMT
> > < Server: Apache/1.3.29
> > < P3P: policyref="/w3c/p3p.xml", CP="NOI DSP COR
> TAIa
> > OUR NOR UNI"
> > < X-Powered-By: PHP/4.3.3
> > < Set-Cookie:
> > PHPSESSID=f5ba0aaaa185a96e6eaa6622841929b1; path=/
> > < Set-Cookie:
> > PHPSESSID=646e1bd8920679150836ecb2fbcc3161; path=/
> > < Location: /
>
> You could add the -L option to get curl to follow
> the HTTP 302 redirect you get
> back, but since it redirects you to the root and
> you're looking to download a
> file, it's likely you need more than this. Have you
> compared the trace from
> curl with a trace from a web browser? There's
> probably something in your
> request that you're missing.
>
> >>> Dan
> --
> http://www.MoveAnnouncer.com The web
> change of address service
> Let webmasters know that your web site has
> moved
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Received on 2006-05-03