You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2013/11/13 11:45:40 UTC

[1/2] git commit: WICKET-5409 wicket-native-websocket does not work with Safari/Safari iOS

Updated Branches:
  refs/heads/master b4a864b09 -> 4e5e182e1


WICKET-5409 wicket-native-websocket does not work with Safari/Safari iOS


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/79e9832b
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/79e9832b
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/79e9832b

Branch: refs/heads/master
Commit: 79e9832b5c58523ea5659367d6eaf46b33b2a895
Parents: b4a864b
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed Nov 13 12:44:53 2013 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed Nov 13 12:44:53 2013 +0200

----------------------------------------------------------------------
 .../protocol/ws/AbstractUpgradeFilter.java      | 14 +---
 .../wicket-native-websocket-jetty9/pom.xml      | 72 ++++++++++----------
 .../ws/tomcat7/Tomcat7WebSocketFilter.java      |  5 ++
 3 files changed, 44 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/79e9832b/wicket-experimental/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/AbstractUpgradeFilter.java
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/AbstractUpgradeFilter.java b/wicket-experimental/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/AbstractUpgradeFilter.java
index 18ca772..cf06720 100644
--- a/wicket-experimental/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/AbstractUpgradeFilter.java
+++ b/wicket-experimental/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/AbstractUpgradeFilter.java
@@ -18,7 +18,6 @@ package org.apache.wicket.protocol.ws;
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Enumeration;
 import java.util.List;
 
@@ -31,6 +30,7 @@ import org.apache.wicket.ThreadContext;
 import org.apache.wicket.protocol.http.WicketFilter;
 import org.apache.wicket.request.cycle.RequestCycle;
 import org.apache.wicket.request.http.WebResponse;
+import org.apache.wicket.util.string.Strings;
 
 /**
  * An extension of WicketFilter that is used to check whether
@@ -78,11 +78,9 @@ public class AbstractUpgradeFilter extends WicketFilter
 		// Information required to send the server handshake message
 		String key;
 		String subProtocol = null;
-		List<String> extensions = Collections.emptyList();
 
 		if (!headerContainsToken(req, "upgrade", "websocket"))
 		{
-//			resp.sendError(HttpServletResponse.SC_BAD_REQUEST);
 			return false;
 		}
 
@@ -113,23 +111,17 @@ public class AbstractUpgradeFilter extends WicketFilter
 			return false;
 		}
 
-		List<String> subProtocols = getTokensFromHeader(req,
-				"Sec-WebSocket-Protocol-Client");
+		List<String> subProtocols = getTokensFromHeader(req, "Sec-WebSocket-Protocol-Client");
 		if (!subProtocols.isEmpty())
 		{
 			subProtocol = selectSubProtocol(subProtocols);
-
 		}
 
-		resp.setHeader("upgrade", "websocket");
-		resp.setHeader("connection", "upgrade");
-
 		if (subProtocol != null)
 		{
 			resp.setHeader("Sec-WebSocket-Protocol", subProtocol);
 		}
 
-
 		return true;
 	}
 
@@ -142,7 +134,7 @@ public class AbstractUpgradeFilter extends WicketFilter
 		Enumeration<String> headers = req.getHeaders(headerName);
 		while (headers.hasMoreElements()) {
 			String header = headers.nextElement();
-			String[] tokens = header.split(",");
+			String[] tokens = Strings.split(header, ',');
 			for (String token : tokens) {
 				if (target.equalsIgnoreCase(token.trim())) {
 					return true;

http://git-wip-us.apache.org/repos/asf/wicket/blob/79e9832b/wicket-experimental/wicket-native-websocket/wicket-native-websocket-jetty9/pom.xml
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-native-websocket/wicket-native-websocket-jetty9/pom.xml b/wicket-experimental/wicket-native-websocket/wicket-native-websocket-jetty9/pom.xml
index ae5d451..ce68e91 100644
--- a/wicket-experimental/wicket-native-websocket/wicket-native-websocket-jetty9/pom.xml
+++ b/wicket-experimental/wicket-native-websocket/wicket-native-websocket-jetty9/pom.xml
@@ -43,40 +43,40 @@
 
 	</dependencies>
 	<build>
-	<pluginManagement>
-		<plugins>
-			<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
-			<plugin>
-				<groupId>org.eclipse.m2e</groupId>
-				<artifactId>lifecycle-mapping</artifactId>
-				<version>1.0.0</version>
-				<configuration>
-					<lifecycleMappingMetadata>
-						<pluginExecutions>
-							<pluginExecution>
-								<pluginExecutionFilter>
-									<groupId>
-										org.apache.felix
-									</groupId>
-									<artifactId>
-										maven-bundle-plugin
-									</artifactId>
-									<versionRange>
-										[2.3.7,)
-									</versionRange>
-									<goals>
-										<goal>manifest</goal>
-									</goals>
-								</pluginExecutionFilter>
-								<action>
-									<ignore />
-								</action>
-							</pluginExecution>
-						</pluginExecutions>
-					</lifecycleMappingMetadata>
-				</configuration>
-			</plugin>
-		</plugins>
-	</pluginManagement>
-    </build>
+		<pluginManagement>
+			<plugins>
+				<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+				<plugin>
+					<groupId>org.eclipse.m2e</groupId>
+					<artifactId>lifecycle-mapping</artifactId>
+					<version>1.0.0</version>
+					<configuration>
+						<lifecycleMappingMetadata>
+							<pluginExecutions>
+								<pluginExecution>
+									<pluginExecutionFilter>
+										<groupId>
+											org.apache.felix
+										</groupId>
+										<artifactId>
+											maven-bundle-plugin
+										</artifactId>
+										<versionRange>
+											[2.3.7,)
+										</versionRange>
+										<goals>
+											<goal>manifest</goal>
+										</goals>
+									</pluginExecutionFilter>
+									<action>
+										<ignore />
+									</action>
+								</pluginExecution>
+							</pluginExecutions>
+						</lifecycleMappingMetadata>
+					</configuration>
+				</plugin>
+			</plugins>
+		</pluginManagement>
+	</build>
 </project>

http://git-wip-us.apache.org/repos/asf/wicket/blob/79e9832b/wicket-experimental/wicket-native-websocket/wicket-native-websocket-tomcat/src/main/java/org/apache/wicket/protocol/ws/tomcat7/Tomcat7WebSocketFilter.java
----------------------------------------------------------------------
diff --git a/wicket-experimental/wicket-native-websocket/wicket-native-websocket-tomcat/src/main/java/org/apache/wicket/protocol/ws/tomcat7/Tomcat7WebSocketFilter.java b/wicket-experimental/wicket-native-websocket/wicket-native-websocket-tomcat/src/main/java/org/apache/wicket/protocol/ws/tomcat7/Tomcat7WebSocketFilter.java
index 8057ddc..1021868 100644
--- a/wicket-experimental/wicket-native-websocket/wicket-native-websocket-tomcat/src/main/java/org/apache/wicket/protocol/ws/tomcat7/Tomcat7WebSocketFilter.java
+++ b/wicket-experimental/wicket-native-websocket/wicket-native-websocket-tomcat/src/main/java/org/apache/wicket/protocol/ws/tomcat7/Tomcat7WebSocketFilter.java
@@ -68,6 +68,11 @@ public class Tomcat7WebSocketFilter extends AbstractUpgradeFilter
 		{
 			return false;
 		}
+		else
+		{
+			resp.setHeader("upgrade", "websocket");
+			resp.setHeader("connection", "upgrade");
+		}
 
 		String key = req.getHeader("Sec-WebSocket-Key");
 		resp.setHeader("Sec-WebSocket-Accept", getWebSocketAccept(key));


[2/2] git commit: Move Jacoco version to the properties

Posted by mg...@apache.org.
Move Jacoco version to the properties


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/4e5e182e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/4e5e182e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/4e5e182e

Branch: refs/heads/master
Commit: 4e5e182e1fe97264060c9f2859daf4e6707c0c76
Parents: 79e9832
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed Nov 13 12:45:19 2013 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed Nov 13 12:45:19 2013 +0200

----------------------------------------------------------------------
 pom.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/4e5e182e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 271dfea..12d005d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,6 +30,7 @@
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<mvn.build.java.version>1.7</mvn.build.java.version>
+		<jacoco.version>0.6.3.201306030806</jacoco.version>
 		<jetty.version>8.1.13.v20130916</jetty.version>
 		<jetty9.version>9.0.6.v20130930</jetty9.version>
 		<spring.version>3.2.4.RELEASE</spring.version>
@@ -149,7 +150,7 @@
 					<plugin>
 						<groupId>org.jacoco</groupId>
 						<artifactId>jacoco-maven-plugin</artifactId>
-						<version>0.6.3.201306030806</version>
+						<version>${jacoco.version}</version>
 						
 						<executions>
 							<execution>