I'm using Grape with Goliath (latest versions). For some reason the headers are not getting sent (in the response) using streaming_response or the array syntax::
def response(env)
My::API.call(env)
streaming_response(200, { 'Content-Type' =>'application/json', 'X-Stream' => 'Goliath' } )
end
I can see debugging the code inside goliath/request.rb that @response.headers has indeed the headers and they are also set correctly in the headers_output method in goliath/response.rb
However, when I use curl -i -X GET "url" I only see the JSON output that I'm returning (no headers). Same behaviour using a web browser.
It does return the headers fine when I'm not using streaming (Goliath::Response::STREAMING).