Permalink
Browse files

Don't need to set content-length

Rack always does that for us
  • Loading branch information...
1 parent 5c3132a commit 1e6ed4c08a8dbdb85e1e7ae0638d75596a2abb1e @ghostganz committed May 10, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/serve-gridfs-image-middleware/serve-gridfs-image.rb
@@ -32,8 +32,7 @@ def process_request(env, key)
return [304, {}, '']
end
end
- headers = {'Content-Type' => file.content_type,
- 'Content-Length' => file.file_length.to_s}
+ headers = {'Content-Type' => file.content_type}
headers['ETag'] = %{"#{file['md5']}"} if file['md5']
[200, headers, [file.read]]
end

0 comments on commit 1e6ed4c

Please sign in to comment.