Fix boolean logic and put ws/wss in always utf-8 mode. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24305