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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/HTTP.pmod/Session.pike:11:   //! and all header, query, post or put information is dropped.   //!   //! Default is 20 redirects. A negative number will mean infinity.   //! @bugs   //! Loops will currently not be detected, only the limit   //! works to stop loops.   //! @seealso   //! @[Request.follow_redirects]   int follow_redirects=20;    + #define RUNTIME_RESOLV(X) master().resolv(#X) +    //! Default HTTP headers.   mapping default_headers = ([    "user-agent":"Mozilla/5.0 (compatible; MSIE 6.0; Pike HTTP client)"    " Pike/"+__REAL_MAJOR__+"."+__REAL_MINOR__+"."+__REAL_BUILD__,   ]);      //! Request   class Request   {   
pike.git/lib/modules/Protocols.pmod/HTTP.pmod/Session.pike:404:    string domain="";    int secure=0;       string _sprintf(int t)    {    if (t=='O')    return sprintf(    "Cookie(%O: %O=%O; expires=%s; path=%O; domain=%O; secure=%d)",    site,    key,data, -  Calendar.ISO.Second(expires)->format_http(), +  RUNTIME_RESOLVE(Calendar.ISO.Second)(expires)->format_http(),    path,domain,secure);    }       void from_http(string s,Standards.URI at)    {    array v=array_sscanf(s,"%{%s=%[^;]%*[; ]%}%s");       site=at->host+":"+at->port;       if (sizeof(v)>=2 && lower_case(v[1])=="secure")
pike.git/lib/modules/Protocols.pmod/HTTP.pmod/Session.pike:427:    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= -  (Calendar.ISO.parse("%e, %D %M %Y %h:%m:%s %z",value)|| -  Calendar.ISO.parse("%e, %D-%M-%y %h:%m:%s %z",value) ) +  (RUNTIME_RESOLV(Calendar.ISO.parse)("%e, %D %M %Y %h:%m:%s %z",value)|| +  RUNTIME_RESOLV(Calendar.ISO.parse)("%e, %D-%M-%y %h:%m:%s %z",value) )    ->unix_time();    break;       case "path":    path=value;    break;       case "domain":    domain=value;    break;