Thema: Delphi indy + cookie

Einzelnen Beitrag anzeigen

FreakET

Registriert seit: 11. Sep 2005
1 Beiträge
 
#1

indy + cookie

  Alt 11. Sep 2005, 21:53
Hallo,
ich möchte mich in einen gmail account einloggen mit hilfe der indy komponenten. mein problem liegt daran das recht viele cookies benutz werden.wenn man alleine auf www.gmail.com geht wird man mehrfach weitergeleitet und es werden mehrere cookies erstellt. das ganze sieht dann so aus :

New Message Log Window....
Client opened: total 1

Code:
+++GET 90+++
GET / HTTP/1.1
Content-Type: text/html
Host: [url]www.gmail.com[/url]
Accept: text/html, */*
User-Agent: Mozilla/3.0 (compatible; Indy Library)
Connection: keep-alive
Accept-encoding: gzip, deflate

+++RESP 90+++
HTTP/1.1 301 Moved Permanently
Location: [url]http://mail.google.com/mail/[/url]
Set-Cookie: PREF=ID=34672cc353fffe21:TM=1126467271:LM=1126467271:S=Dg5unf7CqRYKJ7HA; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com
Content-Type: text/html
Server: GWS/2.1
Transfer-Encoding: chunked
Content-Encoding: gzip
Date: Sun, 11 Sep 2005 19:34:31 GMT
Cache-Control: private, x-gzip-ok=""
Connection stored: 90
+++CLOSE 90+++
Client closed: total 0
Client opened: total 1

+++GET 91+++
GET /mail/ HTTP/1.1
Content-Type: text/html
Host: mail.google.com
Accept: text/html, */*
User-Agent: Mozilla/3.0 (compatible; Indy Library)
Connection: keep-alive
Accept-encoding: gzip, deflate

+++RESP 91+++
HTTP/1.1 302 Moved Temporarily
Set-Cookie: GMAIL_AT=EXPIRED;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: GMAIL_PREFS=EXPIRED;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: GMAIL_LOGIN=EXPIRED;Domain=.google.com;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: GMAIL_STAT=EXPIRED;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: GMAIL_RTT=EXPIRED;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: GBE=EXPIRED;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: GV=; Domain=mail.google.com; Expires=Sat, 10-Sep-05 19:34:32 GMT; Path=/
Set-Cookie: GV=; Domain=mail.google.com; Expires=Sat, 10-Sep-05 19:34:32 GMT; Path=/mail
Set-Cookie: GX=EXPIRED;Path=/mail;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Location: [url]https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&ltmpl=googlemail[/url]
Cache-control: private
Content-Length: 0
Content-Type: text/html
Server: GFE/1.3
Date: Sun, 11 Sep 2005 19:34:32 GMT
Connection stored: 91
+++CLOSE 91+++
Client closed: total 0
Client opened: total 1

+++SSL:GET 92+++
SSL cipher SSLv2 DES-CBC3-MD5 (168 bits)
GET /accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&ltmpl=googlemail HTTP/1.1
Content-Type: text/html
Host: [url]www.google.com:443[/url]
Accept: text/html, */*
User-Agent: Mozilla/3.0 (compatible; Indy Library)
Connection: keep-alive
Accept-encoding: gzip, deflate

+++SSL:RESP 92+++
SSL cipher TLSv1 DES-CBC3-SHA (168 bits)
HTTP/1.1 200 OK
Cache-control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Content-Encoding: gzip
Date: Sun, 11 Sep 2005 19:34:32 GMT
Server: GFE/1.3
Connection stored: 92
+++CLOSE 92+++
Client closed: total 0
Client opened: total 1
es müssen also diese cookies gesetzt werden.
Code:
Set-Cookie: PREF=ID=34672cc353fffe21:TM=1126467271:LM=1126467271:S=Dg5unf7CqRYKJ7HA; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com
Set-Cookie: GMAIL_AT=EXPIRED;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: GMAIL_PREFS=EXPIRED;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: GMAIL_LOGIN=EXPIRED;Domain=.google.com;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: GMAIL_STAT=EXPIRED;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: GMAIL_RTT=EXPIRED;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: GBE=EXPIRED;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: GV=; Domain=mail.google.com; Expires=Sat, 10-Sep-05 19:34:32 GMT; Path=/
Set-Cookie: GV=; Domain=mail.google.com; Expires=Sat, 10-Sep-05 19:34:32 GMT; Path=/mail
Set-Cookie: GX=EXPIRED;Path=/mail;Expires=Mon, 01-Jan-1990 00:00:00 GMT
wenn ich mir jetzt aber beim cookie manager ausgeben lasse welche er erstellt sind es nur diese :
Code:
GMAIL_AT=EXPIRED; path=/; domain=mail.google.com
GMAIL_PREFS=EXPIRED; path=/; domain=mail.google.com
GMAIL_LOGIN=EXPIRED; path=/; domain=.google.com
GMAIL_STAT=EXPIRED; path=/; domain=mail.google.com
GMAIL_RTT=EXPIRED; path=/; domain=mail.google.com
GBE=EXPIRED; path=/; domain=mail.google.com
path=/; domain=mail.google.com
path=/mail; domain=mail.google.com
GX=EXPIRED; path=/mail; domain=mail.google.com
mir sieht es so aus als würde der cookiemanager die zwei GV nicht erstellt weil sie keinen wert haben und das PREF=ID nicht erstellt wegen dem = im namen.

gibts da ne möglichkeit oder muss ich mir an der stelle jetzt die riesen arbeit machen mir die cookies ausm header zu suchen und dann selbstständig zu erstellen oder gibts da nen anderen trick? vielleicht kann ja auch jemand ne besser komponente empfehlen als die indy.

achja benutze die 7er Indy

danke für die hilfe schonmal

gruß
peacemaker2k
  Mit Zitat antworten Zitat