mirror of
https://github.com/hkalexling/Mango.git
synced 2026-04-05 00:00:44 -04:00
Return strings as header values
This commit is contained in:
@@ -253,7 +253,11 @@ class Plugin
|
|||||||
|
|
||||||
env.push_object
|
env.push_object
|
||||||
res.headers.each do |k, v|
|
res.headers.each do |k, v|
|
||||||
env.push_string v.to_s
|
if v.size == 1
|
||||||
|
env.push_string v[0]
|
||||||
|
else
|
||||||
|
env.push_string v.join ","
|
||||||
|
end
|
||||||
env.put_prop_string -2, k
|
env.put_prop_string -2, k
|
||||||
end
|
end
|
||||||
env.put_prop_string -2, "headers"
|
env.put_prop_string -2, "headers"
|
||||||
|
|||||||
Reference in New Issue
Block a user