Hi, these days, I wanted to set an absolute time for the embperl cookie expire time (in 2.0b10) and discovered that the code was totally hosed.
It crashed apache as I forgot the "" around the arguments and then plainly didn't work. The following patch fixes both problems and the documentation, which has the day of the week spelt out (which is wrong, it should be abbreviated to 3 letters). Greetings, Torsten <[EMAIL PROTECTED]>
diff -urN Embperl-2.0b10.orig/eputil.c Embperl-2.0b10/eputil.c --- Embperl-2.0b10.orig/eputil.c 2004-01-23 07:50:55.000000000 +0100 +++ Embperl-2.0b10/eputil.c 2004-02-28 11:01:42.000000000 +0100 @@ -1968,7 +1968,7 @@ else if (*time_str == '+') { ++time_str; } - else if (stricmp(time_str, "now")) { + else if (!stricmp(time_str, "now")) { /*ok*/ } else { @@ -2009,7 +2009,8 @@ when = expire_calc(sTime); if (!when) { - return sTime ; + strcpy( sResult, sTime ); + return sResult ; } tms = gmtime(&when); diff -urN Embperl-2.0b10.orig/Config.pod Embperl-2.0b10/Config.pod --- Embperl-2.0b10.orig/Config.pod 2004-01-23 07:50:17.000000000 +0100 +++ Embperl-2.0b10/Config.pod 2004-02-28 11:11:00.000000000 +0100 @@ -640,7 +640,7 @@ now immediately +3M in three months +10y in ten years time - Thursday, 25-Apr-1999 00:40:33 GMT at the indicated time & date + Thu, 25-Apr-1999 00:40:33 GMT at the indicated time & date =head2 Embperl_Cookie_Secure
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]