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.23 2006/05/06 14:53:06 grubba Exp $ + // $Id: URI.pike,v 1.24 2006/07/13 15:35:46 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:344:   //! The value to assign to @[property]   mixed `->=(string property, mixed value) { return `[]=(property, value); }   mixed `[]=(string property, mixed value)   {    DEBUG("`[]=(%O, %O)", property, value);    switch(property)    {    case "user":    case "password":    case "host": -  case "port": +     if(!stringp(value) && value!=0)    error("%s value not string.\n", property); -  +  case "port":    ::`[]=(property, value);    authority = (user ? user + (password ? ":" + password : "") + "@" : "") +    (host?(has_value(host, ":")?("["+host+"]"):host):"") +    (port != Protocols.Ports.tcp[scheme] ? ":" + port : "");    return value;       case "authority":    if(!stringp(value) && value!=0)    error("authority value not string.\n");    authority = [string]value;