Nicolas Cannasse 17 years ago
parent
commit
c7cefeb228
2 changed files with 2 additions and 1 deletions
  1. 1 0
      doc/CHANGES.txt
  2. 1 1
      std/neko/Web.hx

+ 1 - 0
doc/CHANGES.txt

@@ -1,6 +1,7 @@
 2008-??-??: 1.18
 	some optimization and bugfix for as3 codegen
 	bugfix : allow bitmaps and fonts classes for F9 library
+	bugfix : neko.Web.setCookie
 
 2008-01-13: 1.17
 	fixed Int32.compare, added Int32.read and Int32.write

+ 1 - 1
std/neko/Web.hx

@@ -185,7 +185,7 @@ class Web {
 	public static function setCookie( key : String, value : String, ?expire: Date, ?domain: String, ?path: String, ?secure: Bool ) {
 		var buf = new StringBuf();
 		buf.add(value);
-		addPair(buf, "expires=", DateTools.format(expire, "%a, %d-%b-%Y %H:%M:%S GMT"));
+		if( expire != null ) addPair(buf, "expires=", DateTools.format(expire, "%a, %d-%b-%Y %H:%M:%S GMT"));
 		addPair(buf, "domain=", domain);
 		addPair(buf, "path=", path);
 		if( secure ) addPair(buf, "secure", "");