Patch to XMLHttpRequest and decoder, auto detects scripts charset a little bit better
Fredrik Johansson
fredrik at mumme.se
Sun Jul 9 15:35:46 BST 2006
Hi !
Triggered by the quickness that my other patches got merged into branch, I
thought I cook up a new one :-)
Issues adressed:
1. When using XMLHttpRequest from javascript a http status 304 is converted to
200 on a async call but not on a sync call.
IE and moz converts both to 200
2. When using XMLHttpRequest and the server sends a Content-type: some/mime;
charset=something, it still didnt find the charset.
3. When using XMLHttpRequest to grab only text (such as scripts) and it comes
from cache, there are no Content-type header but there might be a charset
info from KIOSlaves, I grabbed that info, if there still is a Content-type
with charset info it overrules the one from KIOSlaves
4. Sometimes a server doesnt send charset info in Content-type and there is no
clue in the content, such as a scripts, and the file has no BOM bytes,
decoder goes for latin1. So UTF-8 string gets messed up.
If the autodetection has failed and we are about to default for latin1, I
included a last minute UTF-8 check. If that fails then it goes back to latin1
This issue has a bug ticket:
http://bugs.kde.org/show_bug.cgi?id=130234
I also included the test files I used.
By the way, the test dir in the khtml dir, is that the only tests used by
khtml?
Seems kind of few tests for a large project like khtml.
Anyways I wonder if anybody would want to take a look at patch
Regards
Fredrik Johansson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: charset.patch.tar.gz
Type: application/x-tgz
Size: 3855 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20060709/4e41c7a7/attachment.bin>
More information about the kfm-devel
mailing list