LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-18-2007, 02:54 AM   #1
phsythax
Member
 
Registered: Oct 2005
Location: Denmark
Distribution: Gentoo & XP pro for gaming
Posts: 152

Rep: Reputation: 30
HTTP cookie "CAD" ?


I am aware that http isn't exactly a programming language, but i don't know where else to ask, so admins are welcome to move this thread to wherever they think it belongs.

The thing is, i am in the middle of making a http client, and i've come as far as authenticating and getting the cookie from the server. But after that, Wireshark sends a (for me) unknown string before the real cookie to the server:

Cookie: CAD=1359454%231197828980%230%230%23%230; T3E=%3D%3DwN0czN6ITM3AzM4cT....... (cut)

What is this CAD-thing? Does it have anything to do with the expire date of the cookie? How do i generate this?

I hope for serious answers.
Thanks in advance!

- phsythax

Last edited by phsythax; 12-18-2007 at 11:55 AM.
 
Old 12-18-2007, 12:03 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 79
Quote:
Originally Posted by phsythax View Post
Cookie: CAD=1359454%231197828980%230%230%23%230; T3E=%3D%3DwN0czN6ITM3AzM4cT....... (cute)

What is this CAD-thing? Does it have anything to do with the expire date of the cookie? How do i generate this?
Umm… that’s part of the cookie. Cookies come as attribute-value pairs, where you have something like this initially sent by the server:
Code:
Set-Cookie: foo=bar
And the client (i.e., browser) must respond with this:
Code:
Cookie: foo=bar
in every subsequent request.

As for expiry and sessions, you can (on the server side) do things like this:
Code:
Set-Cookie: foo=bar; expires=date; path=/; domain=baz.org; secure
Date is in RFC-822 format (“Wdy, DD-Mon-YYYY HH:MM:SS GMT”), path is the path for which the cookie response is requested, and domain is the domain for which the cookie is desired. Secure means that the cookie should be transmitted back only through secure (i.e., https) communication.

You should read the relevant standards before trying to come up with a compliant client.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Cookie HELL", LOL! BuckNekkid General 9 11-25-2007 09:14 PM
Rewriting "Set-cookie:" http header field J_Szucs Linux - Networking 3 08-06-2007 04:10 AM
"Secret Cookie" raysr SUSE / openSUSE 21 10-12-2006 03:00 AM
"socks5" -> "http" proxy protocol, or ssh tunnel to sock5 ? I'm beyond http p vmicho Linux - Networking 2 12-16-2003 05:32 AM
Apache Related: "http://host/~user" instead of "http://host/~user/" ? scrawl Linux - Software 2 05-19-2003 12:02 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration