Hello!
I do not know if this is the right place to ask the question, but if you can 
give me any hints I would be grateful :).
I am using Merb 1.0.7.1 and Rack 0.4.0. I have all gems in local gems 
directory. I have problem with Content-Length header.
When I run my app with bin/merb in production or development environment 
Content-Length is always set. If I use it with Phusion Passenger the problems 
occurs. Sometimes this header is set, sometimes it is not... This are server 
versions from the response header:
Server: Apache/2.2.9 (Ubuntu) Phusion_Passenger/2.0.3 mod_ssl/2.2.9 
OpenSSL/0.9.8g
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 2.0.3

I overcome it by adding:
rack_response[1] = rack_response[1].merge("Content-Length" => 
rack_response[2].size.to_s) if rack_response[2].methods.include? "size"
just before returning from Merb::Rack::Application#call but it is sort of ugly 
and I do not know enough internals of Merb/Rack/Phusion to come with something 
else.
Best regards,
-- 
Roman Kamyk
[email protected]

Attachment: pgpog1Mrdlsdt.pgp
Description: PGP signature

Reply via email to