curl-users
using cURL: how to sniff what IE sends to server
Date: Wed, 07 Mar 2001 14:27:07 -0800 (Pacific Standard Time)
Although this is somewhat off topic, I would like to post
this question here, because it is actually related to the
usage of cURL.
I am using cURL from a perl script to automate connection to American
Express card and to get my card statement. After several redirections
and cookies, I am stuck in the middle of the web site with the following
cURL output:
HTTP/1.1 302 Moved Temporarily
Server: Netscape-Enterprise/3.6 SP3
Date: Wed, 07 Mar 2001 21:44:54 GMT
Content-Type: text/html;charset="iso-8859-1"
Set-Cookie: sesessionid=ESZYFXIAAGPT3FFN3D2AAAA;Path=/
Cache-Control: no-cache="set-cookie,set-cookie2"
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Location:
https://login.americanexpress.com/sso/Default.asp?SSOOP=LOGON&SSOAPP=EXPRESSNET&SSOBRAND=EXPRESSNET&SSOURL="https://www48.americanexpress.com/en/cards?request_type=authreg_StatementInfo&BPIndex=00&card_no=21000&sorted_index=0&_SSOVISITED_=984001495197"
Connection: close
<head><title>Document moved</title></head>
<body><h1>Document moved</h1>
This document has moved <a
href="https://login.americanexpress.com/sso/Default.asp?SSOOP=LOGON&SSOAPP=EXPRESSNET&SSOBRAND=EXPRESSNET&SSOURL="https://www48.americanexpress.com/en/cards?request_type=authreg_StatementInfo&BPIndex=00&card_no=21000&sorted_index=0&_SSOVISITED_=984001495197"">here</a>.<p>
</body>
<base
href="https://www48.americanexpress.com/en/en_US/papercopy/Redirect.jsp">
<html>
<head><title>American Express | E-Statement </title></head>
<body>
<meta http-equiv="REFRESH"
content="0;URL=https://www.americanexpress.com/en/cards/balance/BalCards">
</body>
</html>
A connection to the URL indicated in the Location field (with the
cookie from the header) brings
me back to the first logon page where I started from, rather than
to my card statement page (that what IE would do, if I use it).
Question #1. Am I doing something wrong here by going to the Location URL?
Question #2. Is there a way to sniff what the browser sends to the server
for furhter usage with the cURL? Since these are secure
connections, I need a tool that does that over SSL connection, I
think.
Thank you in advance, and sorry for the off-topic post.
Gennady.
Received on 2001-03-07