I'm at the starting phase of building a web app using Rack. I'm trying
to add in some useful middleware on top of the Lobster demo. I want to
ensure my app always matches the spec, so I'm using Rack::Lint.
However, this immediately bombs out telling me the Content-Length is
nil. My
config.ru looks like this:
require 'rack'
require 'rack/lobster'
use Rack::ShowExceptions
use Rack::CommonLogger
use Rack::ShowStatus
use Rack::Lint
use Rack::ContentLength
run Rack::Lobster.new
But even if I take it down to this:
require 'rack'
require 'rack/lobster'
use Rack::Lint
use Rack::ContentLength
run Rack::Lobster.new
it still breaks! I'm running the app on Passenger. It does work,
however, if I run straight through the rackup executable. Perhaps
Passenger is mangling my env hash? If I take out Rack::Lint and run it
(via Passenger), the headers do show a valid Content-Length. Weird,
eh?
Perplexed,
Joe