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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:853:   //! then UTF-8 decodes the result. This is the reverse of   //! @[uri_encode] and @[uri_encode_invalids].   //!   //! @seealso   //! @[uri_encode], @[uri_encode_invalids]   {    // Note: This currently does not quite work for URI-to-IRI    // conversion according to RFC 3987 section 3.2. Most importantly    // any invalid utf8-sequences should be left percent-encoded in the    // result. -  return utf8_to_string (_Roxen.http_decode_string (s)); +  s = _Roxen.http_decode_string (s); +  catch { s = utf8_to_string (s); }; +  return s;   }      string iri_encode (string s)   //! Encodes the given string using @tt{%XX@} encoding to be used as a   //! component part in an IRI (Internationalized Resource Identifier,   //! see @rfc{3987@}). This means that all chars outside the IRI   //! @tt{iunreserved@} set are encoded, i.e. this function encodes   //! equivalently to @[uri_encode] except that all 8-bit and wider   //! characters are left as-is.   //!