Skip to content

Commit

Permalink
fix(kong.tools.http): ensure the EMPTY table returned by `parse_dir…
Browse files Browse the repository at this point in the history
…ective_header` is readonly (#13491)

Panic on writing the EMPTY table

* Fix #13458
* https://konghq.atlassian.net/browse/KAG-5139?
  • Loading branch information
ADD-SP authored and ProBrian committed Aug 13, 2024
1 parent b97f4dd commit 4656717
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kong/tools/http.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local pl_path = require "pl.path"
local pl_file = require "pl.file"
local pl_tblx = require "pl.tablex"


local type = type
Expand All @@ -23,7 +24,7 @@ local lower = string.lower
local max = math.max
local tab_new = require("table.new")

local EMPTY = {}
local EMPTY = pl_tblx.readonly({})

local _M = {}

Expand Down

0 comments on commit 4656717

Please sign in to comment.