> Which MIME type did you use in the response? BOM sniffing in XML is > non-normative IIRC. For other types, see below. >
It's text/plain - seems I definitely need one test with an XML response too.. and one with JSON. > > [[ > If charset is null, set charset to utf-8. > > Return the result of running decode on byte stream bytes using fallback > encoding charset. > ]] > Heh, I stopped reading here.. Assuming that "using fallback encoding charset" would actually decode the data per that charset.. > https://encoding.spec.whatwg.org/#decode > > [[ > For each of the rows in the table below, starting with the first one and > going down, if the first bytes of buffer match all the bytes given in the > first column, then set encoding to the encoding given in the cell in the > second column of that row and set BOM seen flag. > ]] > > This step honors the BOM. The fallback encoding is ignored. That's cool because it means the test is correct as-is. Somewhat less cool because it means I need to report another bug.. -Hallvord