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. + //! absolute form, as defined in @rfc{2396@} and @rfc{3986@}.      // Implemented by Johan Sundström and Johan Schön.      #pragma strict_types      //! Scheme component of URI   string scheme;    - //! Authority component of URI (formerly called net_loc, from RFC 2396 + //! Authority component of URI (formerly called net_loc, from @rfc{2396@}   //! known as authority)   string authority;      //! Path component of URI. May be empty, but not undefined.   string path;      //! Query component of URI. May be 0 if not present.   string query;      //! The fragment part of URI. May be 0 if not present.
pike.git/lib/modules/Standards.pmod/URI.pike:564:   protected constant url_from = sprintf("%c", url_chars[*]);   protected constant url_to = sprintf("%%%02x", url_chars[*]);      string http_encode(string in)   {    // We shouldn't really have to soft case here. Bug(ish) in constant    // type generation...    return replace(in, [array(string)]url_from, [array(string)]url_to);   }    - //! Return the query part, coded according to RFC 1738, or zero. + //! Return the query part, coded according to @rfc{1738@}, or zero.   string get_http_query() {    return query;   }    - //! Return the path and query part of the URI, coded according to RFC - //! 1738. + //! Return the path and query part of the URI, coded according to + //! @rfc{1738@}.   string get_http_path_query() {    string q = get_http_query();    return http_encode(((path||"")/"/")[*])*"/" + (q?"?"+q:"");   }      int __hash() { return hash_value(_sprintf('s')); }      private mapping(int:string) sprintf_cache = ([]);   string _sprintf(int how, mapping|void args)   {