[Webkit-unassigned] [Bug 56942] EventSource should accept UTF-8 charset

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 23 12:31:10 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=56942





--- Comment #3 from Alexey Proskuryakov <ap at webkit.org>  2011-03-23 12:31:10 PST ---
(From update of attachment 86657)
View in context: https://bugs.webkit.org/attachment.cgi?id=86657&action=review

Does charset="UTF-8" (with quotes) work? Could you add a test?

Pelase do send a message to HTML mailing list, as suggested by Ian.

> LayoutTests/http/tests/eventsource/eventsource-content-type-charset-expected.txt:1
> +CONSOLE MESSAGE: line 1: EventSource's response had a charset ("Windows-1152") that is not UTF-8. Aborting the connection.

There are two failure subtests, so why only one console message?

> Source/WebCore/page/EventSource.cpp:186
> -    if (statusCode == 200 && response.mimeType() == "text/event-stream") {
> +    bool isResponseValid = statusCode == 200 && response.mimeType() == "text/event-stream";

I'm confused. The bug description sounds like we should be allowing more than we do today, but the actual fix makes code more restrictive. Which is correct?

Also, s/isResponseValid/responseIsValid/ (or isValidResponse).

> Source/WebCore/page/EventSource.cpp:194
> +            String message = "EventSource's response had a charset (\"";
> +            message += charset;
> +            message += "\") that is not UTF-8. Aborting the connection.";

I think it's wrong grammar to have different tenses in one sentence (had... is).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list