[eventsource] check double BOM failed in source.addEventListener()

RESOLVED INVALID

Status

()

Firefox
Untriaged
RESOLVED INVALID
5 years ago
5 years ago

People

(Reporter: tinazhao, Assigned: Wellington Fernando de Macedo)

Tracking

23 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.10 (KHTML, like Gecko) Chrome/23.0.1262.0 Safari/537.10

Steps to reproduce:

ServerSentEvent latest Editor's Draft 23 April 2013 (http://dev.w3.org/html5/eventsource/) test
- Test wiki: http://www.w3.org/wiki/Webapps/Interop/ServerSentEvents
- Test suite: https://github.com/w3c/web-platform-tests/tree/master/eventsource
- Test case: https://github.com/w3c/web-platform-tests/blob/master/eventsource/format-bom-2.htm


Actual results:

Test case failed:
var source = new EventSource("resources/message.php?message=%EF%BB%BF%EF%BB%BFdata%3A1%0A%0Adata%3A2%0A%0Adata%3A3")
source.addEventListener("message", listener, false)
Check double BOM of function listener e.data FALSE.


Expected results:

Check double BOM of function listener e.data TRUE.
See Also: → bug 869432
(Assignee)

Updated

5 years ago
Assignee: nobody → wfernandom2004
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86_64 → All
(Assignee)

Comment 1

5 years ago
According the eventsource spec:
>  stream        = [ bom ] *event
>  event         = *( comment / field ) end-of-line
>  comment       = colon *any-char end-of-line
>  field         = 1*name-char [ colon [ space ] *any-char ] end-of-line
>  end-of-line   = ( cr lf / cr / lf )
>  name-char     = %x0000-0009 / %x000B-000C / %x000E-0039 / %x003B-10FFFF
>                  ; a Unicode character other than U+000A LINE FEED (LF), 
>                    U+000D CARRIAGE RETURN (CR), or U+003A COLON (:)

Therefore, a second BOM should be considered part of the field. So, in the provided test case the field insted of be "data" it would (better, it should be) "BOMdata". Such a field, according the spec should be ignored.

Therefore: 
- Firefox implementation is correct;
- The test case is incorrect;
- Opera and Chrome implementation should fail the test case.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
(Assignee)

Updated

5 years ago
See Also: → bug 662073
(Assignee)

Updated

5 years ago
See Also: bug 869432
You need to log in before you can comment on or make changes to this bug.