Update default SockJS CDN location

This commit updates the default location of the SockJS' client library.
The previous location is being retired by the project maintainers.

The new default location is backed by several CDN providers:
* https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js

See sockjs/sockjs-client#198

Issue: SPR-12254
This commit is contained in:
Brian Clozel 2014-09-26 21:28:05 +02:00
parent 3827e048d1
commit a6e1c53f23
3 changed files with 5 additions and 5 deletions

View File

@ -83,7 +83,7 @@ public class SockJsServiceRegistration {
* this property allows specifying where to load it from.
*
* <p>By default this is set to point to
* "https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.4.min.js". However it can
* "https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js". However it can
* also be set to point to a URL served by the application.
*
* <p>Note that it's possible to specify a relative URL in which case the URL

View File

@ -68,7 +68,7 @@ public abstract class AbstractSockJsService implements SockJsService {
private String name = "SockJSService@" + ObjectUtils.getIdentityHexString(this);
private String clientLibraryUrl = "https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.4.min.js";
private String clientLibraryUrl = "https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js";
private int streamBytesLimit = 128 * 1024;

View File

@ -148,15 +148,15 @@ public class SockJsServiceTests extends AbstractHttpRequestTests {
assertEquals("text/html;charset=UTF-8", this.servletResponse.getContentType());
assertTrue(this.servletResponse.getContentAsString().startsWith("<!DOCTYPE html>\n"));
assertEquals(496, this.servletResponse.getContentLength());
assertEquals(490, this.servletResponse.getContentLength());
assertEquals("public, max-age=31536000", this.response.getHeaders().getCacheControl());
assertEquals("\"0da1ed070012f304e47b83c81c48ad620\"", this.response.getHeaders().getETag());
assertEquals("\"06b486b3208b085d9e3220f456a6caca4\"", this.response.getHeaders().getETag());
}
@Test
public void handleIframeRequestNotModified() throws Exception {
this.servletRequest.addHeader("If-None-Match", "\"0da1ed070012f304e47b83c81c48ad620\"");
this.servletRequest.addHeader("If-None-Match", "\"06b486b3208b085d9e3220f456a6caca4\"");
resetResponseAndHandleRequest("GET", "/echo/iframe.html", HttpStatus.NOT_MODIFIED);
}