Skip to content

Commit 426c275

Browse files
Thomas ChuThomas Chu
Thomas Chu
authored and
Thomas Chu
committed
fix: remove formatting header keys for curl
1 parent 2d9b061 commit 426c275

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

lua/plenary/curl.lua

+1-14
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,7 @@ parse.headers = function(t)
9191
if not t then
9292
return
9393
end
94-
local upper = function(str)
95-
return string.gsub(" " .. str, "%W%l", string.upper):sub(2)
96-
end
97-
return util.kv_to_list(
98-
(function()
99-
local normilzed = {}
100-
for k, v in pairs(t) do
101-
normilzed[upper(k:gsub("_", "%-"))] = v
102-
end
103-
return normilzed
104-
end)(),
105-
"-H",
106-
": "
107-
)
94+
return util.kv_to_list(t, "-H", ": ")
10895
end
10996

11097
parse.data_body = function(t)

0 commit comments

Comments
 (0)