tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bergs...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util CookieTools.java
Date Mon, 03 Jul 2000 09:49:20 GMT
bergsten    00/07/03 02:49:20

  Modified:    src/share/org/apache/tomcat/util Tag: tomcat_32
                        CookieTools.java
  Log:
  Fixed a rounding error for the expiration date
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.7.2.1   +16 -16    jakarta-tomcat/src/share/org/apache/tomcat/util/CookieTools.java
  
  Index: CookieTools.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/CookieTools.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- CookieTools.java	2000/05/24 17:19:53	1.7
  +++ CookieTools.java	2000/07/03 09:49:11	1.7.2.1
  @@ -1,13 +1,13 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/CookieTools.java,v
1.7 2000/05/24 17:19:53 costin Exp $
  - * $Revision: 1.7 $
  - * $Date: 2000/05/24 17:19:53 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/CookieTools.java,v
1.7.2.1 2000/07/03 09:49:11 bergsten Exp $
  + * $Revision: 1.7.2.1 $
  + * $Date: 2000/07/03 09:49:11 $
    *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -15,7 +15,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -23,15 +23,15 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  + *    any, must include the following acknowlegement:
  + *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowlegement may appear in the software itself,
    *    if and wherever such third-party acknowlegements normally appear.
    *
    * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  + *    from this software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache"
  @@ -59,7 +59,7 @@
    *
    * [Additional notices, if required by prior licensing conditions]
    *
  - */ 
  + */
   
   
   package org.apache.tomcat.util;
  @@ -83,7 +83,7 @@
        */
       public static String getCookieHeaderName(Cookie cookie) {
           int version = cookie.getVersion();
  -	
  +
           if (version == 1) {
   	    return "Set-Cookie2";
           } else {
  @@ -99,21 +99,21 @@
   	getCookieHeaderValue( cookie, buf );
   	return buf.toString();
       }
  -    
  +
       /** Return the header value used to set this cookie
        */
       public static void getCookieHeaderValue(Cookie cookie, StringBuffer buf) {
           int version = cookie.getVersion();
   
           // this part is the same for all cookies
  -        
  +
           buf.append(cookie.getName());
           buf.append("=");
           maybeQuote(version, buf, cookie.getValue());
   
  - 	// add version 1 specific information 
  + 	// add version 1 specific information
   	if (version == 1) {
  -	    // Version=1 ... required 
  +	    // Version=1 ... required
   	    buf.append (";Version=1");
   
   	    // Comment=comment
  @@ -134,7 +134,7 @@
   	if (cookie.getMaxAge() >= 0) {
   	    if (version == 0) {
   		buf.append (";Expires=");
  -		DateTool.oldCookieFormat.format(new Date( System.currentTimeMillis() + cookie.getMaxAge()
*1000) ,buf,
  +		DateTool.oldCookieFormat.format(new Date( System.currentTimeMillis() + cookie.getMaxAge()
*1000L) ,buf,
   						new FieldPosition(0));
   
   	    } else {
  @@ -186,7 +186,7 @@
   	      return false;
   	}
   	return true;
  -    }    
  +    }
   
   
   }
  
  
  

Mime
View raw message