dataurisrc: Allow case-insensitive scheme

Quoting RFC 2396:

  For resiliency, programs interpreting URI should treat upper case
  letters as equivalent to lower case in scheme names (e.g., allow
  "HTTP" as well as "http").
This commit is contained in:
Benjamin Otte 2019-05-21 17:15:52 +02:00
parent 29557fe623
commit 3c2312ce6b

View file

@ -334,7 +334,7 @@ gst_data_uri_src_set_uri (GstURIHandler * handler, const gchar * uri,
/* uri must be an URI as defined in RFC 2397
* data:[<mediatype>][;base64],<data>
*/
if (strncmp ("data:", uri, 5) != 0)
if (g_ascii_strncasecmp ("data:", uri, 5) != 0)
goto invalid_uri;
uri += 5;