Closed Bug 869882 Opened 11 years ago Closed 11 years ago

[eventsource] Check HTTP status:204,205,210,299 readyState returns CONNECTING but not CLOSED and throws unreached assertion

Categories

(Core :: DOM: Core & HTML, defect)

23 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla24

People

(Reporter: tina.zhao, Assigned: wfernandom2004)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31

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/request-status-error.htm


Actual results:

In SSE spec:
-Any other HTTP response code not listed here, and any network error that prevents the HTTP connection from being established in the first place (e.g. DNS errors), must cause the user agent to fail the connection.
-When a user agent is to fail the connection, the user agent must queue a task to set the readyState attribute to CLOSED and fire a simple event named error at the EventSource object. Once the user agent has failed the connection, it does not attempt to reconnect!

When check HTTP status: 204, 205, readyState got CONNECTING; 
and check HTTP status: 210, 299, it goes to onmessage() throws assertion:assert_unreached: Reached unreachable code.


Expected results:

When check HTTP status: 204, 205, readyState should return CLOSED;
and check HTTP status: 210, 299, it should go to onerror() and the readyState return CLOSED.
See Also: → 869432
See Also: → 662073
See Also: 869432
I assume this applies to Nightly (24.0a1) as well? Can someone please confirm and move this to the appropriate bugzilla component?
Assignee: nobody → wfernandom2004
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86_64 → All
Component: Untriaged → DOM
Product: Firefox → Core
Attached patch patchSplinter Review
Attachment #757148 - Flags: review?
Attachment #757148 - Flags: review? → review?(bugs)
Comment on attachment 757148 [details] [diff] [review]
patch

So we don't end up in this code when non-2xx is handled? Looks like so.
http://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/HttpBaseChannel.cpp#1151
Attachment #757148 - Flags: review?(bugs) → review+
Attachment #757148 - Flags: checkin?(bugs)
I guess I should push the patch first to try
> I guess I should push the patch first to try
Yes, I think it would be a good idea. Thank you Olli.

tinazhao, finishing this bug all Firefox EventSource related bugs will be finished. Please, update (or ask the responsible to update) the wiki and the test cases according the conclusions of the bugs you have opened.
https://hg.mozilla.org/mozilla-central/rev/7d29016d1c53
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
(In reply to Wellington Fernando de Macedo from comment #6)
> > I guess I should push the patch first to try
> Yes, I think it would be a good idea. Thank you Olli.
> 
> tinazhao, finishing this bug all Firefox EventSource related bugs will be
> finished. Please, update (or ask the responsible to update) the wiki and the
> test cases according the conclusions of the bugs you have opened.

Verified. The test case get PASS on Firefox: nightly 26.0a1 (2013-08-13).
Status: RESOLVED → VERIFIED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: