mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	Properly select "guacamole" protocol.
This commit is contained in:
		| @@ -20,6 +20,7 @@ package org.glyptodon.guacamole.net.basic.websocket.tomcat; | ||||
|  */ | ||||
|  | ||||
| import java.io.IOException; | ||||
| import java.util.List; | ||||
| import javax.servlet.ServletException; | ||||
| import javax.servlet.http.HttpServletRequest; | ||||
| import javax.servlet.http.HttpServletResponse; | ||||
| @@ -107,6 +108,19 @@ public abstract class AuthenticatingWebSocketServlet extends WebSocketServlet { | ||||
|  | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     protected String selectSubProtocol(List<String> subProtocols) { | ||||
|  | ||||
|         // Search for expected protocol | ||||
|         for (String protocol : subProtocols) | ||||
|             if ("guacamole".equals(protocol)) | ||||
|                 return "guacamole"; | ||||
|          | ||||
|         // Otherwise, fail | ||||
|         return null; | ||||
|  | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public StreamInbound createWebSocketInbound(String protocol, | ||||
|         HttpServletRequest request) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user