Skip to content

Commit

Permalink
revert pdk.request.get_header
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Jan 13, 2024
1 parent f4f2bb7 commit b032e10
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions kong/pdk/request.lua
Original file line number Diff line number Diff line change
Expand Up @@ -625,23 +625,7 @@ local function new(self)
error("header name must be a string", 2)
end

local value = var["http_" .. replace_dashes(name)]

if value then
local p = find(value, ", ", 1, true) -- changed since nginx 1.23.0

if p then
local GMT_TIME_FMT_LEN = 29 --"Mon, 28 Sep 1970 06:00:00 GMT"

if p == 4 and #value == GMT_TIME_FMT_LEN and sub(value, -3) == "GMT" then
return value
end

return sub(value, 1, p - 1)
end
end

return value
return var["http_" .. replace_dashes(name)]
end


Expand Down

0 comments on commit b032e10

Please sign in to comment.