Branch: Tag:

2019-07-05

2019-07-05 10:32:35 by Martin Nilsson <nilsson@fastmail.com>

Decoded string could contain illegal UTF-8 sequence. Added catch in uri_decode to not crash when such string is encountered.

860:    // 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)