[ic] Cookie patch

Mike Heins mheins@redhat.com
Mon, 19 Mar 2001 13:38:34 -0500


I fixed Vend/Server.pm to accept formatted date strings as well
as UNIX time values. Patch below, will be applied to both stable
and development.

===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Server.pm,v
retrieving revision 1.8
diff -r1.8 Server.pm
285,287c285,296
< 			$expire = $Vend::Expire unless defined $expire;
< 			$out .= " expires=" .
< 						strftime "%a, %d-%b-%y %H:%M:%S GMT ", gmtime($expire);
---
> 			my $expstring;
> 			if(! $expire) {
> 				$expire = $Vend::Expire;
> 			}
> 			elsif($expire =~ /\s\S+\s/) {
> 				$expstring = $expire;
> 			}
> 			$expstring = strftime "%a, %d-%b-%Y %H:%M:%S GMT ", gmtime($expire)
> 				unless $expstring;
> 			$expstring = "expires=$expstring" if $expstring !~ /^\s*expires=/i;
> 			$expstring =~ s/^\s*/ /;
> 			$out .= $expstring;

-- 
Red Hat, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <mheins@redhat.com>

My wife is great.  She doesn't care where I go, just as long as I don't
have any fun.  -- Lee Trevino