Permalink
Browse files

Ensure proper handling of information headers.

  • Loading branch information...
piotrmurach committed Jun 30, 2012
1 parent 8028013 commit bda1695762e7ddffb3c7cdb58cbcbb4791e319f6
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/rack/policy/cookie_limiter.rb
@@ -54,7 +54,8 @@ def allowed?(request)
# Finish http response with proper headers
def finish(env)
- if [204, 304].include?(status.to_i)
+ if [204, 304].include?(status.to_i) || (status.to_i / 100 == 1)
+ headers.delete "Content-Length"
headers.delete "Content-Type"
[status.to_i, headers, []]
elsif env['REQUEST_METHOD'] == 'HEAD'

0 comments on commit bda1695

Please sign in to comment.