From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS12876 195.154.0.0/16 X-Spam-Status: No, score=-0.7 required=3.0 tests=AWL,BAYES_05,RCVD_IN_XBL shortcircuit=no autolearn=no version=3.3.2 X-Original-To: rainbows-public@bogomips.org Received: from 80x24.org (tor-exit.gansta93.com [195.154.56.44]) by dcvr.yhbt.net (Postfix) with ESMTP id EE1EE1F45D for ; Sat, 14 Nov 2015 02:47:34 +0000 (UTC) From: Eric Wong To: rainbows-public@bogomips.org Subject: [PATCH 2/5] kill the moronic Status: header Date: Sat, 14 Nov 2015 02:47:22 +0000 Message-Id: <20151114024725.24139-3-e@80x24.org> In-Reply-To: <20151114024725.24139-1-e@80x24.org> References: <20151114024725.24139-1-e@80x24.org> List-Id: 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" -- EW