luci-base: error404: do not access request env directly
authorJo-Philipp Wich <jo@mein.io>
Tue, 10 Apr 2018 10:01:39 +0000 (12:01 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 10 Apr 2018 10:01:43 +0000 (12:01 +0200)
Instead of attempting to access the request environment directly (which does
not work anyway using the CGI SGI), use the already sanitized
dispatcher.context.request property to print out the not found url.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/view/error404.htm

index bc74226..a762f60 100644 (file)
@@ -7,5 +7,5 @@
 <%+header%>
 <h2 name="content">404 <%:Not Found%></h2>
 <p><%:Sorry, the object you requested was not found.%></p>
-<tt><%:Unable to dispatch%>: <%=luci.http.request.env.PATH_INFO%></tt>
+<tt><%:Unable to dispatch%>: <%=url(unpack(luci.dispatcher.context.request))%></tt>
 <%+footer%>