cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Strange cookie problem?

From: David Raasch <infoiwant_at_frontierblazers.com>
Date: Tue, 27 Jul 2004 18:27:56 -0500

Greetings All!

Several months ago, I rewrote a little application I have that scans
"multiple ebays" (Ebay U.S., Ebay Canada, Ebay UK, etc.) for the same search
phrase. This was at the time when Ebay suddenly decided that, in order to
search their closed auctions, it wanted all users to log in first.

So, with some help from this list, I converted my application so that it
started using curl to do the simulated logins. It's been working like a
charm for months.

Each site is basically put into an array, along with it's login page URL and
the login processing page URL... and then we simply loop through the same
chunk of code (curl calls).

Well, I don't know when this happened, but when I checked it today,
suddenly, logins to Ebay Canada ONLY fail.

I did some script debugging and I basically determined that when the first
page we hit tells us to set a cookie, we're not writing it.

I told the script to print the output it was being given and here are the
results of two such sessions... one from a curl call to Ebay U.S. (works /
writes successfully) and one for Ebay Canada (fails). I spaced things out a
bit for easier comparisons:

  EBAY:
  
  Connection: close Content-Type: text/html
  Set-Cookie: secure_ticket=n; path=/; domain=.ebay.com; secure
  Set-Cookie: ebaysignin=; path=/; domain=.ebay.com
  
  Set-Cookie: secure_ticket_l2=n; path=/; domain=.ebay.com; secure
  Set-Cookie: sru=X; path=/; domain=.ebay.com; expires=Fri, 01-Sep-1995
00:00:00 GMT Set-Cookie:
s=AQAAAAEAAAASAAAAMwAAABnABkGZ+g9BMXRlc3RDb29raWUgJDIkJDJnU01BR3FMM2hvdlRJej
FrQ1RiWjEAzc3NzQ**n; path=/; domain=.ebay.com
  Set-Cookie: sru=X; path=/; domain=.ebay.com; expires=Fri, 01-Sep-1995
00:00:00 GMT Set-Cookie:
s=AQAAAAEAAAASAAAAMwAAABnABkGZ+g9BMXRlc3RDb29raWUgJDIkJDJnU01BR3FMM2hvdlRJej
FrQ1RiWjEAzc3NzQ**n; path=/; domain=.ebay.com
  
  
  
  EBAY CA:
  
  IISExport: This web site was exported using IIS Export v2.2 Connection:
close Content-Type: text/html
  Set-Cookie: secure_ticket=n; path=/; domain=.ebay.ca; secure
  Set-Cookie: ebaysignin=; path=/; domain=.ebay.ca
  
  Set-Cookie: secure_ticket_l2=n; path=/; domain=.ebay.ca; secure
  Set-Cookie: sru=X; path=/; domain=.ebay.ca; expires=Fri, 01-Sep-1995
00:00:00 GMT
  Set-Cookie:
s=AQAAAAEAAAASAAAAMwAAADDABkGw+g9BMXRlc3RDb29raWUgJDIkJDJnU01BR3FMM2hvdlRJej
FrQ1RiWjEAzc3NzQ**e; path=/; domain=.ebay.ca Set-Cookie: sru=X; path=/;
domain=.ebay.ca; expires=Fri, 01-Sep-1995 00:00:00 GMT Set-Cookie:
s=AQAAAAEAAAASAAAAMwAAADDABkGw+g9BMXRlc3RDb29raWUgJDIkJDJnU01BR3FMM2hvdlRJej
FrQ1RiWjEAzc3NzQ**e; path=/;

Does anybody know off-hand why curl refuses to write this second cookie?

Also, I'm sure somebody's going to say "did you try this at the command
line?"
It's been months since I tried this sort of thing... and even then I only
spent maybe 30 minutes on it. Could somebody point me to a URL that would
refresh me with the command syntax for doing this?

Thanks!

-= Dave =-
Received on 2004-07-28

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET