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

version» Context lines:

pike.git/lib/modules/Standards.pmod/URI.pike:116:      string combine_uri_path(string base, string rel)   {    string buf;       // RFC 2396, ยง5.2.6:    // a) All but the last segment of the base URI's path component is    // copied to the buffer. In other words, any characters after the    // last (right-most) slash character, if any, are excluded.    array segments=base/"/"; -  if(has_value(base, "/")) +     buf=segments[..<1]*"/"+"/"; -  else -  buf=base; +        // b) The reference's path component is appended to the buffer string.    buf+=rel;    segments = buf / "/";       // c) All occurrences of "./", where "." is a complete path segment,    // are removed from the buffer string.    for(int i=0; i<sizeof(segments)-1; i++)    if(segments[i]==".")    segments[i]=0;