pike.git / lib / modules / Protocols.pmod / HTTP.pmod / module.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:333:    })*"&";    return http_encode_string(v[0])+"="+    http_encode_string(v[1]);    })*"&";   }      // RFC 1738, 2.2. URL Character Encoding Issues   static constant url_non_corresponding = enumerate(0x21) +    enumerate(0x81,1,0x7f);   static constant url_unsafe = ({ '<', '>', '"', '#', '%', '{', '}', -  '|', '\\', '^', '~', '[', ']', '`', '\'' }); +  '|', '\\', '^', '~', '[', ']', '`' });   static constant url_reserved = ({ ';', '/', '?', ':', '@', '=', '&' });      // Encode these chars   static constant url_chars = url_non_corresponding + url_unsafe + -  url_reserved + ({ '+' }); +  url_reserved + ({ '+', '\'' });   static constant url_from = sprintf("%c", url_chars[*]);   static constant url_to = sprintf("%%%02x", url_chars[*]);         //! This protects all odd - see @[http_encode_query()] -   //! characters for transfer in HTTP.   //!   //! Do not use this function to protect URLs, since   //! it will protect URL characters like @expr{'/'@} and @expr{'?'@}.   //! @param in