pike.git / lib / modules / Protocols.pmod / HTTP.pmod / Session.pike

version» Context lines:

pike.git/lib/modules/Protocols.pmod/HTTP.pmod/Session.pike:425:    secure=1;       if (sizeof(v)<1) return;    v=v[0];    if (sizeof(v)<1) return;    [key,data]=v[0];       foreach (v[1..];;[string what,string value])    switch (lower_case(what))    { -  case "expires": -  expires= +  case "expires": { +  object tmp =    (Calendar.ISO.parse("%e, %D %M %Y %h:%m:%s %z",value)|| -  Calendar.ISO.parse("%e, %D-%M-%y %h:%m:%s %z",value) ) -  ->unix_time(); +  Calendar.ISO.parse("%e, %D-%M-%y %h:%m:%s %z",value) ); +  /* Some servers send malformed expiry dates. +  * We treat those as if no expiry date had been set */ +  if (tmp) expires=tmp->unix_time();    break; -  +  }    case "path":    path=value;    break;       case "domain":    domain=value;    break;    }    }