zevarito/mixpanel — pull request #20 by bradx3 (2011-10-26 01:22:51+00:00)
Title: Fix for send_file returning 0 bytes #16

I've checked this worked on our servers, but couldn't get a failing test to commit. This was the best I could do, but it wouldn't fail even without the changes I made. Any ideas?

describe "With attachment responses" do
before do
setup_rack_application(DummyApp, :body => nil,
:headers => {"Content-Type" => "application/pdf", "Content-Length" => 123})
get "/"
end

it "should leave the body untouched" do
last_response.body.should == html_document
end

it "should not reset the content length" do
last_response.headers["Content-Length"].should == "123"
end
end