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      // Implemented by Johan Sundström and Johan Schön. - // $Id: URI.pike,v 1.15 2002/12/11 23:10:35 anders Exp $ + // $Id: URI.pike,v 1.16 2003/03/08 22:22:53 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:49:      // Parse authority component (according to RFC 1738, § 3.1)   static void parse_authority()   {    if(sscanf(authority, "%[^@]@%s", string auth, authority) == 2)    {    sscanf(auth, "%[^:]:%s", user, password); // auth info present    DEBUG("parse_authority(): user=%O, password=%O", user, password);    }    if(scheme) -  port = [int]Protocols.Ports.tcp[scheme]; // Set a good default á la RFC 1700 +  port = Protocols.Ports.tcp[scheme]; // Set a good default á la RFC 1700    sscanf(authority, "%[^:]%*[:]%d", host, port);    DEBUG("parse_authority(): host=%O, port=%O", host, port);   }      // Inherit all properties except raw_uri and base_uri from the URI uri. :-)   static void inherit_properties(object(this_program) uri)   {    authority = uri->authority;    scheme = uri->scheme;    user = uri->user; password = uri->password;