>X-Sender: [EMAIL PROTECTED]
>X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
>To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
>From: Chuck Esterbrook <[EMAIL PROTECTED]>
>Subject: Re: [Webware-discuss] Cookies
>Sender: [EMAIL PROTECTED]
>X-BeenThere: [EMAIL PROTECTED]
>X-Mailman-Version: 2.0.3
>List-Help: <mailto:[EMAIL PROTECTED]?subject=help>
>List-Post: <mailto:[EMAIL PROTECTED]>
>List-Subscribe: <http://lists.sourceforge.net/lists/listinfo/webware-discuss>,
> 
><mailto:[EMAIL PROTECTED]?subject=subscribe>
>List-Id: Discussion of Webware for Python including feedback and 
>proposals. <webware-discuss.lists.sourceforge.net>
>List-Unsubscribe: 
><http://lists.sourceforge.net/lists/listinfo/webware-discuss>,
> 
><mailto:[EMAIL PROTECTED]?subject=unsubscribe>
>List-Archive: <http://lists.sourceforge.net/archives//webware-discuss/>
>Date: Tue, 03 Apr 2001 23:16:41 -0400
>
>
>A look at Jakarta/Tomcat reveals that they switch between Expires and 
>Max-Age depending on the cookie version. This is version 3.2.1's 
>CookieTools.java:
>
>         if (cookie.getMaxAge() >= 0) {
>             if (version == 0) {
>                 buf.append (";Expires=");
>                 if (cookie.getMaxAge() == 0)
>                     DateTool.oldCookieFormat.format(new Date(10000), buf,
>                                                     new FieldPosition(0));
>                 else
>                     DateTool.oldCookieFormat.format
>                         (new Date( System.currentTimeMillis() +
>                                    cookie.getMaxAge() *1000L), buf,
>                          new FieldPosition(0));
>             } else {
>                 buf.append (";Max-Age=");
>                 buf.append (cookie.getMaxAge());
>             }
>         } else if (version == 1)
>           buf.append (";Discard");
>
>
>In 3.2.3m2 they do things a little different. The file is ServerCookie.java:
>
>         // Max-Age=secs/Discard ... or use old "Expires" format
>         if (maxAge >= 0) {
>             if (version == 0) {
>                 // XXX XXX XXX We need to send both, for
>                 // interoperatibility (long word )
>                 buf.append ("; Expires=");
>                 // Wdy, DD-Mon-YY HH:MM:SS GMT ( Expires netscape format )
>                 // To expire we need to set the time back in future
>                 // ( [EMAIL PROTECTED] )
>                 if (maxAge == 0)
>                     buf.append( ancientDate );
>                 else
>                     DateTool.oldCookieFormat.format
>                         (new Date( System.currentTimeMillis() +
>                                    maxAge *1000L), buf,
>                          new FieldPosition(0));
>
>             } else {
>                 buf.append ("; Max-Age=");
>                 buf.append (maxAge);
>             }
>         }
>
>
>Interesting, eh?
>
>
>-Chuck
>
>
>_______________________________________________
>Webware-discuss mailing list
>[EMAIL PROTECTED]
>http://lists.sourceforge.net/lists/listinfo/webware-discuss


_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to