Bug 206064

Summary: EventSource Http Status: 200 but Showing Error
Product: WebKit Reporter: Dhruvesh Parikh <parikhdhruvesh1>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bburg, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Mac   
OS: macOS 10.15   
Attachments:
Description Flags
safari eventsource with close none

Description Dhruvesh Parikh 2020-01-10 05:56:41 PST
Created attachment 387331 [details]
safari eventsource with close

When using EventSource (https://developer.mozilla.org/en-US/docs/Web/API/EventSource) library in Safari 13, with closing the connection when done,
Ex: 
var source = new window.EventSource("someurl");
source.onmessage = function(event) {
    source.close();
};


I am getting error in WebInspector inspite the status code is 200. Means behaviour is as intended, only showing error in WebInspector UI.
I have explained in image the same.

Image: bug-safari-eventsource-close.jpeg

When we are not closing the EventSource object it works fine
#source.close() 

Can we solve this ?

Link: https://jsfiddle.net/parikhdhruvesh1/kxos7yjz/24/
Comment 1 Radar WebKit Bug Importer 2020-01-10 13:55:32 PST
<rdar://problem/58489814>