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.25 2006/11/04 19:06:49 nilsson Exp $ + // $Id: URI.pike,v 1.26 2008/01/04 20:48:15 nilsson 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:460:      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.   string get_http_query() { -  mapping out = ([]); +  mapping(string:string) out = ([]);    foreach(get_query_variables(); string name; string value)    out[http_encode(name)] = http_encode(value);    return ((array)out)[*]*"="*"&";   }      //! 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():"");