diff --git a/lib/reel/response.rb b/lib/reel/response.rb index 4ac7f25..b734eeb 100644 --- a/lib/reel/response.rb +++ b/lib/reel/response.rb @@ -36,7 +36,7 @@ def initialize(status, body_or_headers = nil, body = nil) else raise TypeError, "can't render #{@body.class} as a response body" end - @headers = HTTP::Headers.from_hash(headers) + @headers = HTTP::Headers.coerce(headers) @version = http_version end diff --git a/lib/reel/stream.rb b/lib/reel/stream.rb index 223ee1a..99fcad4 100644 --- a/lib/reel/stream.rb +++ b/lib/reel/stream.rb @@ -102,7 +102,7 @@ def initialize(status, headers, body) raise TypeError, "can't render #{@body.class} as a response body" end - @headers = HTTP::Headers.from_hash(headers) + @headers = HTTP::Headers.coerce(headers) @version = http_version end