From 9f9f6a2f76e2dd0cd2ab6e6b4b591f93b21a6ddc Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 14 Nov 2015 02:47:22 +0000 Subject: kill the moronic Status: header Whatever compatibility reasons which existed in 2009 likely do not exist now. Other servers (e.g. thin, puma) seem to work alright without it, so there's no reason to waste precious bytes. --- lib/rainbows/response.rb | 3 +-- lib/rainbows/stream_response_epoll.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/rainbows/response.rb b/lib/rainbows/response.rb index b7b6aa8..db14ee4 100644 --- a/lib/rainbows/response.rb +++ b/lib/rainbows/response.rb @@ -42,8 +42,7 @@ module Rainbows::Response hijack = nil status = CODES[status.to_i] || status buf = "HTTP/1.1 #{status}\r\n" \ - "Date: #{httpdate}\r\n" \ - "Status: #{status}\r\n" + "Date: #{httpdate}\r\n" headers.each do |key, value| case key when %r{\A(?:Date\z|Connection\z)}i diff --git a/lib/rainbows/stream_response_epoll.rb b/lib/rainbows/stream_response_epoll.rb index 33d7386..c0d90a4 100644 --- a/lib/rainbows/stream_response_epoll.rb +++ b/lib/rainbows/stream_response_epoll.rb @@ -31,7 +31,7 @@ module Rainbows::StreamResponseEpoll if headers # don't set extra headers here, this is only intended for # consuming by nginx. - buf = "HTTP/1.0 #{status}\r\nStatus: #{status}\r\n" + buf = "HTTP/1.0 #{status}\r\n" headers.each do |key, value| case key when "rack.hijack" -- cgit v1.2.3-24-ge0c7