luci-lib-base: forward luci.http.context.request.message to ucode
authorJo-Philipp Wich <jo@mein.io>
Mon, 19 Sep 2022 12:20:27 +0000 (14:20 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 24 Oct 2022 23:03:37 +0000 (01:03 +0200)
Some existing LuCI application code accesses the
`luci.http.context.request.message.params` HTTP parameter table directly.

Forward the `luci.http.context.request.message` object to the ucode
`luci.http.message` instance in order to properly support this.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libs/luci-lib-base/luasrc/http.lua

index 06547ae2ce378364723aa7b3428b2343d642367b..3b0865082d3f178083056781e172c45a5598e432 100644 (file)
@@ -140,5 +140,6 @@ context = {
                content        = function(self, ...) return content(...)        end;
                getcookie      = function(self, ...) return getcookie(...)      end;
                setfilehandler = function(self, ...) return setfilehandler(...) end;
+               message        = L.http.message
        }
 }