Skip to content

Commit

Permalink
Polish URL Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rwinch committed Mar 21, 2019
1 parent 6a0ef1a commit c8732d0
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "https://java.sun.com/dtd/properties.dtd">
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">

<properties version="1.0">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "https://java.sun.com/dtd/properties.dtd">
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">

<properties version="1.0">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "https://java.sun.com/dtd/properties.dtd">
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">

<properties version="1.0">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "https://java.sun.com/dtd/properties.dtd">
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties version="1.0">
<entry key="foo">bar</entry>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void read() throws IOException {
inputMessage.getHeaders().setContentType(new MediaType("application", "rss+xml", StandardCharsets.UTF_8));
Channel result = converter.read(Channel.class, inputMessage);
assertEquals("title", result.getTitle());
assertEquals("http://example.com", result.getLink());
assertEquals("https://example.com", result.getLink());
assertEquals("description", result.getDescription());

List<?> items = result.getItems();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -920,14 +920,14 @@ public void testCors() throws Exception {
assertEquals(2, configs.size());
CorsConfiguration config = configs.get("/api/**");
assertNotNull(config);
assertArrayEquals(new String[]{"http://domain1.com", "http://domain2.com"}, config.getAllowedOrigins().toArray());
assertArrayEquals(new String[]{"https://domain1.com", "https://domain2.com"}, config.getAllowedOrigins().toArray());
assertArrayEquals(new String[]{"GET", "PUT"}, config.getAllowedMethods().toArray());
assertArrayEquals(new String[]{"header1", "header2", "header3"}, config.getAllowedHeaders().toArray());
assertArrayEquals(new String[]{"header1", "header2"}, config.getExposedHeaders().toArray());
assertFalse(config.getAllowCredentials());
assertEquals(Long.valueOf(123), config.getMaxAge());
config = configs.get("/resources/**");
assertArrayEquals(new String[]{"http://domain1.com"}, config.getAllowedOrigins().toArray());
assertArrayEquals(new String[]{"https://domain1.com"}, config.getAllowedOrigins().toArray());
assertArrayEquals(new String[]{"GET", "HEAD", "POST"}, config.getAllowedMethods().toArray());
assertArrayEquals(new String[]{"*"}, config.getAllowedHeaders().toArray());
assertNull(config.getExposedHeaders());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ public void sockJsAttributes() {
List<HandshakeInterceptor> interceptors = transportService.getHandshakeInterceptors();
assertThat(interceptors, contains(instanceOf(OriginHandshakeInterceptor.class)));
assertTrue(transportService.shouldSuppressCors());
assertTrue(transportService.getAllowedOrigins().contains("http://mydomain1.com"));
assertTrue(transportService.getAllowedOrigins().contains("http://mydomain2.com"));
assertTrue(transportService.getAllowedOrigins().contains("https://mydomain1.com"));
assertTrue(transportService.getAllowedOrigins().contains("https://mydomain2.com"));
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ public void simpleBroker() throws Exception {
interceptors = defaultSockJsService.getHandshakeInterceptors();
assertThat(interceptors, contains(instanceOf(FooTestInterceptor.class),
instanceOf(BarTestInterceptor.class), instanceOf(OriginHandshakeInterceptor.class)));
assertTrue(defaultSockJsService.getAllowedOrigins().contains("http://mydomain3.com"));
assertTrue(defaultSockJsService.getAllowedOrigins().contains("http://mydomain4.com"));
assertTrue(defaultSockJsService.getAllowedOrigins().contains("https://mydomain3.com"));
assertTrue(defaultSockJsService.getAllowedOrigins().contains("https://mydomain4.com"));

SimpUserRegistry userRegistry = this.appContext.getBean(SimpUserRegistry.class);
assertNotNull(userRegistry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
</websocket:decorator-factories>
</websocket:transport>

<websocket:stomp-endpoint path=" /foo,/bar" allowed-origins="https://mydomain1.com,http://mydomain2.com">
<websocket:stomp-endpoint path=" /foo,/bar" allowed-origins="https://mydomain1.com,https://mydomain2.com">
<websocket:handshake-handler ref="myHandler"/>
<websocket:handshake-interceptors>
<bean class="org.springframework.web.socket.config.FooTestInterceptor"/>
<ref bean="barTestInterceptor"/>
</websocket:handshake-interceptors>
</websocket:stomp-endpoint>

<websocket:stomp-endpoint path="/test,/sockjs" allowed-origins="https://mydomain3.com,http://mydomain4.com">
<websocket:stomp-endpoint path="/test,/sockjs" allowed-origins="https://mydomain3.com,https://mydomain4.com">
<websocket:handshake-handler ref="myHandler"/>
<websocket:handshake-interceptors>
<bean class="org.springframework.web.socket.config.FooTestInterceptor"/>
Expand Down

0 comments on commit c8732d0

Please sign in to comment.