-
Bug
-
Resolution: Fixed
-
Major
-
Freshly, 8.5.0
-
Security Level: Jimmy
-
reproduced on jetty 9.4.6.v20170531 and tomcat 8.5.20
-
None
Steps to Reproduce
<zk> <button label="Enable Server Push" onClick="desktop.enableServerPush(true);"/> <button label="Disable Server Push" onClick="desktop.enableServerPush(false);"/> </zk>
Clicking the button "Enable..."
Current Result
SEVERE: java.lang.IllegalArgumentException: Request cannot be null at javax.servlet.ServletRequestWrapper.<init>(ServletRequestWrapper.java:89) at javax.servlet.http.HttpServletRequestWrapper.<init>(HttpServletRequestWrapper.java:86) at org.zkoss.zkmax.au.websocket.RequestWrapper.<init>(RequestWrapper.java:39) at org.zkoss.zkmax.au.websocket.WebSocketServerPush.setWebSocketConnectionInfos(WebSocketServerPush.java:81) at org.zkoss.zkmax.au.websocket.WebSocketServerPush.start(WebSocketServerPush.java:100) at org.zkoss.zk.ui.impl.DesktopImpl.enableServerPush0(DesktopImpl.java:1527) at org.zkoss.zk.ui.impl.DesktopImpl.enableServerPush(DesktopImpl.java:1470) at org.zkoss.zk.ui.impl.DesktopImpl.enableServerPush(DesktopImpl.java:1455) at org.zkoss.zk.ui.impl.DesktopImpl.enableServerPush(DesktopImpl.java:1451) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498)
Expected Result
SP enabled for the Desktop - no exception
Debug Info
happens on both tomcat and jetty
Workaround
enable SP once the page loads (since it's using the same websocket there's no overhead on the network side)