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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/HTTP.pmod/Session.pike:365:    void check_for_cookies()    {    if (!con->ok || !con->headers || !cookie_encountered) return;       foreach (con->headers["set-cookie"]||({});;string cookie)    cookie_encountered(cookie,url_requested);    }      // ----------------    + #pragma no_deprecation_warnings   //! But since this clears the HTTP connection from the Request object,   //! it can also be used to reuse a @[Request] object.    void destroy()    {    if (con) return_connection(url_requested,con);    con=0;    } -  + #pragma deprecation_warnings      //! @[_destruct] is called when an object is destructed.    protected void _destruct()    {    destroy();    }      // ----------------    -  string _sprintf(int t) +  protected string _sprintf(int t)    {    if (t=='O')    return sprintf("Request(%O",(string)url_requested)+    (!con?" - no connection"    :((con->con?" - connected":"")+    (!con->ok?" - failed"    :" - "+(sizeof(con->buf)+" bytes received"))))+    ")";    }   }
pike.git/lib/modules/Protocols.pmod/HTTP.pmod/Session.pike:412:   class Cookie   {    string key="?";    string data="?";    string site="?";    int expires=-1;    string path="/";    string domain="";    int secure=0;    -  string _sprintf(int t) +  protected string _sprintf(int t)    {    if (t=='O')    return sprintf(    "Cookie(%O: %O=%O; expires=%s; path=%O; domain=%O; secure=%d)",    site,    key,data,    RUNTIME_RESOLV(Calendar.ISO.Second)(expires)->format_http(),    path,domain,secure);    }   
pike.git/lib/modules/Protocols.pmod/HTTP.pmod/Session.pike:618:   Thread.Mutex connection_cache_mux = Thread.Mutex();   int connections_kept_n=0;   int connections_inuse_n=0;   mapping(string:int) connections_host_n=([]);      protected class KeptConnection   {    string lookup;    Query q;    -  void create(string _lookup,Query _q) +  protected void create(string _lookup,Query _q)    {    Thread.MutexKey key = connection_cache_mux->lock(2);    lookup=_lookup;    q=_q;       call_out(disconnect,time_to_keep_unused_connections);    connection_cache[lookup]=    (connection_cache[lookup]||({}))+({this});    connections_kept_n++;    }
pike.git/lib/modules/Protocols.pmod/HTTP.pmod/Session.pike:1019:   class SessionURL   {    inherit Standards.URI;      //! the referer to this URL    URL referer;      //! instantiate a SessionURL object;   //! when fed to Protocols.HTTP.Session calls, will add   //! referer to the HTTP handshaking variables -  void create(URL uri, +  protected void create(URL uri,    URL base_uri,    URL _referer)    {    ::create(uri,base_uri);    referer=_referer;    }   }      class SessionQuery   {    inherit Query;       int n_used=1;    constant is_sessionquery=1;   }