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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:289:    "™", "ú", "û", "ù", "ü", "ý", "¥", "ÿ", "|", "&", }),    );   }      //! Encodes a query mapping to a string;   //! this protects odd - in http perspective - characters   //! like '&' and '#' and control characters,   //! and packs the result together in a HTTP query string.   //!   //! Example: - //! @pre{ + //! @tt{   //! > Protocols.HTTP.http_encode_query( (["anna":"eva","lilith":"blue"]) );   //! Result: "lilith=blue&anna=eva"   //! > Protocols.HTTP.http_encode_query( (["&":"&","'=\"":"\0\0\0"]) );   //! Result: "%26amp%3b=%26&%27%3d%22=%00%00%00"   //! @}   string http_encode_query(mapping(string:int|string) variables)   {    return Array.map((array)variables,    lambda(array(string|int) v)    {