From a471d10cd793c4dc7182b4e588a21d6ac7c41de7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 30 Dec 2010 08:32:22 +0000 Subject: return 206 status for partial sendfile responses Although curl did not complain, 206 is the correct error code for partial HTTP responses. --- lib/rainbows/response/range.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/rainbows/response/range.rb b/lib/rainbows/response/range.rb index 5d8f01e..b383587 100644 --- a/lib/rainbows/response/range.rb +++ b/lib/rainbows/response/range.rb @@ -27,7 +27,7 @@ module Rainbows::Response::Range count = clen if count > clen headers[Content_Length] = count.to_s headers[Content_Range] = "bytes #{offset}-#{offset+count-1}/#{clen}" - [ status, offset, count ] + [ 206, offset, count ] end # nil if no status end -- cgit v1.2.3-24-ge0c7