{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/issues/606","repository_url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api","labels_url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/issues/606/labels{/name}","comments_url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/issues/606/comments","events_url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/issues/606/events","html_url":"https://github.com/eclipse-ee4j/jaxrs-api/issues/606","id":308837576,"number":606,"title":"Clarification on the way to handle various HTTP response codes","user":{"login":"NicoNes","id":19169964,"avatar_url":"https://avatars3.githubusercontent.com/u/19169964?v=4","gravatar_id":"","url":"https://api.github.com/users/NicoNes","html_url":"https://github.com/NicoNes","followers_url":"https://api.github.com/users/NicoNes/followers","following_url":"https://api.github.com/users/NicoNes/following{/other_user}","gists_url":"https://api.github.com/users/NicoNes/gists{/gist_id}","starred_url":"https://api.github.com/users/NicoNes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicoNes/subscriptions","organizations_url":"https://api.github.com/users/NicoNes/orgs","repos_url":"https://api.github.com/users/NicoNes/repos","events_url":"https://api.github.com/users/NicoNes/events{/privacy}","received_events_url":"https://api.github.com/users/NicoNes/received_events","type":"User","site_admin":false},"labels":[{"id":878367883,"url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/labels/spec","name":"spec","color":"f40222","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-27T06:28:41Z","updated_at":"2018-04-08T21:09:29Z","closed_at":null,"author_association":"NONE","body":"Can the JAVA SSE spec be more clear on how to handle all various response codes possible, the way  https://html.spec.whatwg.org/multipage/server-sent-events.html does ?\r\n\r\nThe java SSE spec only talks about 503 but what   about others response codes:\r\n\r\n**1.** 204\r\n\r\nAccording to WHATWG spec:\r\n\r\n> Clients will reconnect if the connection is closed; a client can be told to stop reconnecting using the HTTP 204 No Content response code.\r\n\r\n- Does JAXRS SSE impl should interpret this code the same way ?\r\n\r\n- If true should we close the SseEventSource and invoke the completion listener/onComplete to notify user about the eventSource completion?\r\n\r\n- Should 204 be treated as unrecoverrable error =>  Do we have to notify error callback ? \r\n\r\n**2.** 503\r\n\r\n- Do we have to notify error callback wheither the \"retry-after\" is set or not? Or just when the \"retry-after\" is not set.\r\n\r\n**3.** Response code other than 200, 204 and 503\r\n\r\nAccording to WHATWG spec (https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model):\r\n\r\n> Any other HTTP response code not listed here, as well as the cancelation of the fetch algorithm by the user agent (e.g. in response to window.stop() or the user canceling the network connection manually) must cause the user agent to fail the connection.\r\n\r\n- Should JAXRS impl do the same and only accept 200, 204 and 503?\r\n- If true  should those response codes be treated as unrecoverrable error =>  Do we have to notify error callback ?\r\n\r\nA more general question:\r\n\r\nOnce SseEventSource is closed should the completion callback be always invoked even if no event consumer has never been triggered ?\r\n\r\nThanks\r\n"},"comment":{"url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/issues/comments/379582831","html_url":"https://github.com/eclipse-ee4j/jaxrs-api/issues/606#issuecomment-379582831","issue_url":"https://api.github.com/repos/eclipse-ee4j/jaxrs-api/issues/606","id":379582831,"user":{"login":"mkarg","id":1701815,"avatar_url":"https://avatars2.githubusercontent.com/u/1701815?v=4","gravatar_id":"","url":"https://api.github.com/users/mkarg","html_url":"https://github.com/mkarg","followers_url":"https://api.github.com/users/mkarg/followers","following_url":"https://api.github.com/users/mkarg/following{/other_user}","gists_url":"https://api.github.com/users/mkarg/gists{/gist_id}","starred_url":"https://api.github.com/users/mkarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkarg/subscriptions","organizations_url":"https://api.github.com/users/mkarg/orgs","repos_url":"https://api.github.com/users/mkarg/repos","events_url":"https://api.github.com/users/mkarg/events{/privacy}","received_events_url":"https://api.github.com/users/mkarg/received_events","type":"User","site_admin":false},"created_at":"2018-04-08T21:09:29Z","updated_at":"2018-04-08T21:09:29Z","author_association":"MEMBER","body":"@andymc12 Will you sponsor this issue? So I would assign it to you now."}}
{"actor":{"display_login":"mkarg"}}