# This page will set two cookies on a user's browser.
# One is persistent and will last until the specified expiration date.
# The other has no specified expiration date, and is therefore
# a session cookie (i.e., expires when the user quits the browser).

# Note that we aren't using ReturnHeaders; we can't because the cookie
# itself must be part of the HTTP headers 

# see http://home.netscape.com/newsref/std/cookie_spec.html
# for full documentation of the Magic Cookie protocol

ns_write "HTTP/1.0 200 OK
MIME-Version: 1.0
Content-Type: text/html
Set-Cookie:  for_today=what_will_be; path=/
Set-Cookie:  for_the_ages=anna_karenina; path=/; expires=Fri, 01-Jan-2010 01:00:00 GMT

<html>
<head>
<title>Thank You</title>
</head>

<body bgcolor=#ffffff text=#000000>
<h2>Thank You</h2>

<hr>

Thank you for using this cookie test.  

<p>You should now have two cookies for this server set in your browser, one called
<code>for_today</code> and one called
<code>for_the_ages</code>.

<p>Visit <a
href=\"check-cookies.tcl\">check-cookies.tcl</a> to see what your
browser is in fact now sending to the server, as part of the HTTP
request.

<hr>
<a href=\"http://photo.net/philg/\"><address>philg@mit.edu</address></a>
</body>
</html>
"
