From 8d99400c5fac1b38db91e3f2d6c36cb9f919be6f Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Sat, 25 Jul 2020 16:19:39 +0000 Subject: [PATCH] Return strings as header values --- src/plugin/plugin.cr | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugin/plugin.cr b/src/plugin/plugin.cr index 13aa112..acd5b98 100644 --- a/src/plugin/plugin.cr +++ b/src/plugin/plugin.cr @@ -253,7 +253,11 @@ class Plugin env.push_object 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 end env.put_prop_string -2, "headers"