mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 05:49:04 +00:00
Fix bug with deriving SockJS path
This commit is contained in:
+8
-1
@@ -71,13 +71,20 @@ public class AbstractSockJsServiceTests extends AbstractHttpRequestTests {
|
||||
public void getSockJsPathForInfoRequest() throws Exception {
|
||||
|
||||
handleRequest("GET", "/a/info", HttpStatus.OK);
|
||||
|
||||
assertTrue(this.servletResponse.getContentAsString().startsWith("{\"entropy\":"));
|
||||
|
||||
handleRequest("GET", "/a/server/session/xhr", HttpStatus.OK);
|
||||
|
||||
assertEquals("session", this.service.sessionId);
|
||||
assertEquals(TransportType.XHR, this.service.transportType);
|
||||
assertSame(this.handler, this.service.handler);
|
||||
|
||||
this.service.setValidSockJsPrefixes("/b");
|
||||
|
||||
handleRequest("GET", "/a/info", HttpStatus.NOT_FOUND);
|
||||
|
||||
handleRequest("GET", "/b/info", HttpStatus.OK);
|
||||
|
||||
assertTrue(this.servletResponse.getContentAsString().startsWith("{\"entropy\":"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user