Final response after redirection without CORS response headers


Same Origin XMLHttpRequest Request (same origin -> same origin)

XMLHttpRequest CORS Request (same origin -> cross origin)

XMLHttpRequest CORS Request (cross origin -> same origin)

XMLHttpRequest CORS Request (cross origin -> cross origin) -> This corresponds to the test case that fails in https://github.com/w3c/web-platform-tests/blob/master/eventsource/eventsource-close.htm


Final response after redirection with CORS response headers


Same Origin XMLHttpRequest Request (same origin -> same origin)

XMLHttpRequest CORS Request (same origin -> cross origin)

XMLHttpRequest CORS Request (cross origin -> same origin)

XMLHttpRequest CORS Request (cross origin -> cross origin)