Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: rainbows-public@bogomips.org
Subject: [PATCH 2/5] kill the moronic Status: header
Date: Sat, 14 Nov 2015 02:47:22 +0000	[thread overview]
Message-ID: <20151114024725.24139-3-e@80x24.org> (raw)
In-Reply-To: <20151114024725.24139-1-e@80x24.org>

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


  parent reply	other threads:[~2015-11-14  2:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-14  2:47 [WIP 0/5] updates for unicorn 5 internal changes Eric Wong
2015-11-14  2:47 ` [PATCH 1/5] http_parser: handle keepalive_requests internally Eric Wong
2015-11-14  2:47 ` Eric Wong [this message]
2015-11-14  2:47 ` [PATCH 3/5] reflect changes in Rack::Utils::HTTP_STATUS_CODES Eric Wong
2015-11-14  2:47 ` [PATCH 4/5] reduce constant lookup dependencies Eric Wong
2015-11-14  2:47 ` [PATCH 5/5] http_parser: workaround hijack changes in unicorn 5 Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/rainbows/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151114024725.24139-3-e@80x24.org \
    --to=e@80x24.org \
    --cc=rainbows-public@bogomips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/rainbows.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).