From: Jo-Philipp Wich Date: Sun, 15 Jun 2008 12:57:02 +0000 (+0000) Subject: * luci/libs: drop depency to luci.bits use tonumber() for hex decoding X-Git-Tag: 0.8.0~811 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a80f704e37d08837a15e693bfea8c07bc956152d;p=oweals%2Fluci.git * luci/libs: drop depency to luci.bits use tonumber() for hex decoding --- diff --git a/libs/web/luasrc/http/protocol.lua b/libs/web/luasrc/http/protocol.lua index 31e8f5e8d..2c83257c9 100644 --- a/libs/web/luasrc/http/protocol.lua +++ b/libs/web/luasrc/http/protocol.lua @@ -16,7 +16,6 @@ $Id$ module("luci.http.protocol", package.seeall) require("luci.util") -require("luci.bits") HTTP_MAX_CONTENT = 1048576 -- 1 MB @@ -29,7 +28,7 @@ HTTP_DEFAULT_VERSION = "1.0" -- HTTP default version function urldecode( str ) local function __chrdec( hex ) - return string.char( luci.bits.Hex2Dec( hex ) ) + return string.char( tonumber( hex, 16 ) ) end if type(str) == "string" then