You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an encoded URL is processed by ClassPathContentHandler it fails with an IllegalArgumentException and generates a 500 server error. This is a regression and breaks examples/microprofile/messaging-sse
Also, the exception is logged at the FINE level. Anything that generates a 500 should log the error at the ERROR level.
Here is the exception:
[Fri May 01 10:34:47 PDT 2020] FINEST: io.helidon.webserver.RequestRouting$RoutedRequest next - (reqID: 3) Routing next: /example/send/Fly Helidon!
[Fri May 01 10:34:47 PDT 2020] FINEST: io.helidon.webserver.ClassPathContentHandler doHandle - Requested class path resource: WEB/example/send/Fly Helidon!
[Fri May 01 10:34:47 PDT 2020] FINE: io.helidon.webserver.StaticContentHandler handle - Failed to access static resource
java.lang.IllegalArgumentException: Illegal character in path at index 20: WEB/example/send/Fly Helidon!
at java.base/java.net.URI.create(URI.java:883)
at io.helidon.webserver.ClassPathContentHandler.doHandle(ClassPathContentHandler.java:95)
at io.helidon.webserver.StaticContentHandler.handle(StaticContentHandler.java:79)
at io.helidon.webserver.StaticContentSupport.lambda$update$0(StaticContentSupport.java:64)
at io.helidon.webserver.RequestRouting$RoutedRequest.next(RequestRouting.java:317)
at io.helidon.media.jsonp.server.JsonSupport.accept(JsonSupport.java:98)
at io.helidon.webserver.RequestRouting$RoutedRequest.next(RequestRouting.java:317)
at io.helidon.media.jsonp.server.JsonSupport.accept(JsonSupport.java:98)
at io.helidon.webserver.RequestRouting$RoutedRequest.next(RequestRouting.java:317)
at io.helidon.metrics.MetricsSupport$MetricsContextHandler.accept(MetricsSupport.java:621)
at io.helidon.webserver.RequestRouting$RoutedRequest.next(RequestRouting.java:317)
at io.helidon.metrics.MetricsSupport.lambda$configureVendorMetrics$7(MetricsSupport.java:372)
at io.helidon.webserver.RequestRouting$RoutedRequest.next(RequestRouting.java:317)
at io.helidon.webserver.WebTracingConfig$RequestSpanHandler.accept(WebTracingConfig.java:234)
at io.helidon.webserver.RequestRouting$RoutedRequest.next(RequestRouting.java:317)
at io.helidon.common.context.Contexts.runInContext(Contexts.java:98)
at io.helidon.webserver.RequestRouting.route(RequestRouting.java:82)
at io.helidon.webserver.ForwardingHandler.channelRead0(ForwardingHandler.java:153)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:295)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.URISyntaxException: Illegal character in path at index 20: WEB/example/send/Fly Helidon!
at java.base/java.net.URI$Parser.fail(URI.java:2915)
at java.base/java.net.URI$Parser.checkChars(URI.java:3086)
at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3168)
at java.base/java.net.URI$Parser.parse(URI.java:3127)
at java.base/java.net.URI.<init>(URI.java:600)
at java.base/java.net.URI.create(URI.java:881)
... 39 more
[Fri May 01 10:34:47 PDT 2020] FINEST: io.helidon.webserver.RequestRouting$RoutedRequest nextNoCheck - (reqID: 3) Routing error: class io.helidon.webserver.HttpException
[Fri May 01 10:34:47 PDT 2020] FINEST: io.helidon.webserver.BareResponseImpl writeStatusAndHeaders - (reqID: 3) Writing headers: 500 Internal Server Error
Steps to reproduce
Go to examples/microprofile/messaging-sse and change logging.properties so that .level=FINEST
Build and run examples/microprofile/messaging-sse
Load page in browser and click Send (which by defaults sends text with spaces that must be URL encoded).
See error from server
The text was updated successfully, but these errors were encountered:
Environment Details
Problem Description
When an encoded URL is processed by
ClassPathContentHandler
it fails with anIllegalArgumentException
and generates a 500 server error. This is a regression and breaks examples/microprofile/messaging-sseAlso, the exception is logged at the FINE level. Anything that generates a 500 should log the error at the ERROR level.
Here is the exception:
Steps to reproduce
examples/microprofile/messaging-sse
and change logging.properties so that.level=FINEST
examples/microprofile/messaging-sse
The text was updated successfully, but these errors were encountered: