After this change, AbstractSockJsService does not add CORS headers if
the response already contains an "Access-Control-Allow-Origin" header.
Essentially it backs off assuming CORS headers are handled centrally
e.g. through a Filter.
In order to support this, the ServletServerHttpResponse now returns an
instance of HttpHeaders that also provides access to headers already
present in the HttpServletResponse.
Issue: SPR-11443
@ -49,6 +58,7 @@ public class ServletServerHttpResponse implements ServerHttpResponse {
@@ -49,6 +58,7 @@ public class ServletServerHttpResponse implements ServerHttpResponse {
@ -105,4 +115,56 @@ public class ServletServerHttpResponse implements ServerHttpResponse {
@@ -105,4 +115,56 @@ public class ServletServerHttpResponse implements ServerHttpResponse {
@ -54,25 +54,25 @@ public class SockJsServiceTests extends AbstractHttpRequestTests {
@@ -54,25 +54,25 @@ public class SockJsServiceTests extends AbstractHttpRequestTests {
@ -86,19 +86,32 @@ public class SockJsServiceTests extends AbstractHttpRequestTests {
@@ -86,19 +86,32 @@ public class SockJsServiceTests extends AbstractHttpRequestTests {
@ -111,7 +124,7 @@ public class SockJsServiceTests extends AbstractHttpRequestTests {
@@ -111,7 +124,7 @@ public class SockJsServiceTests extends AbstractHttpRequestTests {
@ -125,23 +138,35 @@ public class SockJsServiceTests extends AbstractHttpRequestTests {
@@ -125,23 +138,35 @@ public class SockJsServiceTests extends AbstractHttpRequestTests {
@ -149,15 +174,6 @@ public class SockJsServiceTests extends AbstractHttpRequestTests {
@@ -149,15 +174,6 @@ public class SockJsServiceTests extends AbstractHttpRequestTests {