Test for bug 5744 - correctly determine the encoding of XMLHttpRequest responses.