pike.git / lib / modules / Standards.pmod / URI.pike

version» Context lines:

pike.git/lib/modules/Standards.pmod/URI.pike:1:   #pike __REAL_VERSION__      //! This class implements URI parsing and resolving of relative references to   //! absolute form, as defined in RFC 2396 and RFC 3986.      // Implemented by Johan Sundström and Johan Schön. - // $Id: URI.pike,v 1.26 2008/01/04 20:48:15 nilsson Exp $ + // $Id: URI.pike,v 1.27 2008/01/05 14:28:05 grubba Exp $      #pragma strict_types      //! Scheme component of URI   string scheme;      //! Authority component of URI (formerly called net_loc, from RFC 2396   //! known as authority)   string authority;   
pike.git/lib/modules/Standards.pmod/URI.pike:476:   //! Return the path and query part of the URI, coded according to RFC   //! 1738.   string get_http_path_query() {    return http_encode(((path||"")/"/")[*])*"/" +    (query?"?"+get_http_query():"");   }         string _sprintf(int how, mapping|void args)   { -  string look, _scheme = scheme, _host = host, getstring; +  string look, _host = host, getstring;    switch(how)    {    case 't':    return "Standards.URI";       case 'x': // A case-mangling version, especially suited for readable hash values    if(_host) _host = lower_case(_host); -  +  default:    case 's':    case 'O':    getstring = (path||"") +    (query ? "?" + query : "");    look =    (scheme?(scheme + ":"):"") +    (authority ?    "//" +    (user ? user + (password ? ":" + password : "") + "@" : "") +    (_host?(has_value(_host, ":")?("["+_host+"]"):_host):"") +