[ 
https://issues.apache.org/jira/browse/WICKET-6746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17034676#comment-17034676
 ] 

ASF subversion and git services commented on WICKET-6746:
---------------------------------------------------------

Commit a868311d1875454129baac75e620a13c0311bb28 in wicket's branch 
refs/heads/master from Emond Papegaaij
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=a868311 ]

WICKET-6746: no need to resolve current scheme is desired is ANY

Resolving the current scheme breaks on WebSocket requests when rendering
urls for resources, because HttpsMapper only knows http and https, not
ws.


> HttpsMapper cannot deal with resources over websockets
> ------------------------------------------------------
>
>                 Key: WICKET-6746
>                 URL: https://issues.apache.org/jira/browse/WICKET-6746
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket, wicket-native-websocket
>    Affects Versions: 9.0.0-M4
>            Reporter: Martin Tzvetanov Grigorov
>            Assignee: Emond Papegaaij
>            Priority: Major
>         Attachments: wicket-6746.tar.gz
>
>
> Wicket Examples WebSocket demo "Initiate download with Web Socket message" is 
> broken in current master due to the new wicket-core.css:
> {code}
> ERROR - DefaultExceptionMapper     - unexpected exception when handling 
> another exception: An error occurred while generating an Url for handler 
> 'ResourceReferenceRequestHandler{resourceReference=scope: 
> org.apache.wicket.css.WicketCoreCSSResourceReference; name: wicket-core.css; 
> locale: null; style: null; variation: null, pageParameters=}'
> org.apache.wicket.WicketRuntimeException: An error occurred while generating 
> an Url for handler 'ResourceReferenceRequestHandler{resourceReference=scope: 
> org.apache.wicket.css.WicketCoreCSSResourceReference; name: wicket-core.css; 
> locale: null; style: null; variation: null, pageParameters=}'
>       at 
> org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:560)
>       at 
> org.apache.wicket.markup.head.CssReferenceHeaderItem.getUrl(CssReferenceHeaderItem.java:151)
>       at 
> org.apache.wicket.markup.head.CssReferenceHeaderItem.getRenderTokens(CssReferenceHeaderItem.java:138)
>       at 
> org.apache.wicket.markup.head.internal.HeaderResponse.wasItemRendered(HeaderResponse.java:61)
>       at 
> org.apache.wicket.markup.head.internal.HeaderResponse.render(HeaderResponse.java:52)
>       at 
> org.apache.wicket.page.PartialPageUpdate$PartialHeaderResponse.render(PartialPageUpdate.java:702)
>       at 
> org.apache.wicket.markup.head.ResourceAggregator.renderHeaderItems(ResourceAggregator.java:339)
>       at 
> org.apache.wicket.markup.head.ResourceAggregator.close(ResourceAggregator.java:308)
>       at 
> org.apache.wicket.page.PartialPageUpdate.writeComponents(PartialPageUpdate.java:299)
>       at 
> org.apache.wicket.page.PartialPageUpdate.writeTo(PartialPageUpdate.java:167)
>       at 
> org.apache.wicket.protocol.ws.api.WebSocketRequestHandler.respond(WebSocketRequestHandler.java:239)
>       at 
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:917)
>       at 
> org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:63)
>       at 
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:283)
>       at 
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:254)
>       at 
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:222)
>       at 
> org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.broadcastMessage(AbstractWebSocketProcessor.java:260)
>       at 
> org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.onMessage(AbstractWebSocketProcessor.java:148)
>       at 
> org.apache.wicket.protocol.ws.javax.JavaxWebSocketProcessor$StringMessageHandler.onMessage(JavaxWebSocketProcessor.java:65)
>       at 
> org.apache.wicket.protocol.ws.javax.JavaxWebSocketProcessor$StringMessageHandler.onMessage(JavaxWebSocketProcessor.java:60)
>       at 
> org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:395)
>       at 
> org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:119)
>       at 
> org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:495)
>       at 
> org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:294)
>       at 
> org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:133)
>       at 
> org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:82)
>       at 
> org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:171)
>       at 
> org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:151)
>       at 
> org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
>       at 
> org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
>       at 
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:59)
>       at 
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
>       at 
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639)
>       at 
> org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
>       at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>       at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>       at 
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>       at java.base/java.lang.Thread.run(Thread.java:834)
> Caused by: java.lang.IllegalStateException: Could not resolve protocol for 
> request: org.apache.wicket.protocol.ws.api.ServletRequestCopy@5c61f8d8
>       at 
> org.apache.wicket.protocol.https.HttpsMapper.getSchemeOf(HttpsMapper.java:224)
>       at 
> org.apache.wicket.protocol.https.HttpsMapper.mapHandler(HttpsMapper.java:176)
>       at 
> org.apache.wicket.protocol.https.HttpsMapper.mapHandler(HttpsMapper.java:121)
>       at 
> org.apache.wicket.request.mapper.CompoundRequestMapper.mapHandler(CompoundRequestMapper.java:210)
>       at 
> org.apache.wicket.protocol.ws.api.WebSocketRequestMapper.mapHandler(WebSocketRequestMapper.java:61)
>       at 
> org.apache.wicket.request.cycle.RequestCycle.mapUrlFor(RequestCycle.java:454)
>       at 
> org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:554)
>       ... 37 more
> WARN  - WebSocketResponse          - An HTTP error response in WebSocket 
> communication would not be processed by the browser! If you need to send the 
> error code and message to the client then configure custom WebSocketResponse 
> via WebSocketSettings#newWebSocketResponse() factory method and override 
> #sendError() method to write them in an appropriate format for your 
> application. The ignored error code is '500' and the message: 'null'.
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to