kwebio / kweb-core

A Kotlin web framework
https://docs.kweb.io/book
GNU Lesser General Public License v3.0
969 stars 57 forks source link

URL validation throws "Missing scheme" when rendering notFound path #130

Closed dertroglodyt closed 4 years ago

dertroglodyt commented 4 years ago

Version: com.github.kwebio:kweb-core:0.7.10" Testing on localhost from IntelliJ with Chrome.

In prelude.kt: line 299: rr.notFoundReceiver.invoke(this, URL.parse(this.browser.url.value).path())

Log: [ktor-jetty-16097-1] ERROR kweb.WebBrowser - Exception thrown building page io.mola.galimatias.GalimatiasParseException: Missing scheme at io.mola.galimatias.GalimatiasParseException$Builder.build(GalimatiasParseException.java:103) at io.mola.galimatias.URLParser.handleFatalMissingSchemeError(URLParser.java:173) at io.mola.galimatias.URLParser.parse(URLParser.java:387) at io.mola.galimatias.URL.parse(URL.java:307) at kweb.PreludeKt$route$1.invoke(prelude.kt:299) at kweb.PreludeKt$route$1.invoke(prelude.kt) at kweb.state.RenderKt$render$2.invoke(render.kt:57) at kweb.state.RenderKt$render$2.invoke(render.kt) at kweb.ElementKt.new(Element.kt:386) at kweb.ElementKt.new$default(Element.kt:383) at kweb.state.RenderKt.render(render.kt:54) at kweb.PreludeKt.route(prelude.kt:279)

sanity commented 4 years ago

Could you try again with version 0.7.11 which I've just released?

dertroglodyt commented 4 years ago

Yes, that solved it. Thanks.