lib/pitchfork/http_response.rb in pitchfork-0.12.0 vs lib/pitchfork/http_response.rb in pitchfork-0.13.0

- old
+ new

@@ -1,6 +1,7 @@ # -*- encoding: binary -*- +# frozen_string_literal: true # :enddoc: module Pitchfork # Writes a Rack response to your client using the HTTP/1.1 specification. # You use it by simply doing: @@ -46,13 +47,13 @@ hijack = nil if headers code = status.to_i msg = STATUS_CODES[code] - start = req.response_start_sent ? ''.freeze : 'HTTP/1.1 '.freeze + start = req.response_start_sent ? '' : 'HTTP/1.1 ' buf = "#{start}#{msg ? %Q(#{code} #{msg}) : status}\r\n" \ "Date: #{httpdate}\r\n" \ - "Connection: close\r\n" + "Connection: close\r\n".b headers.each do |key, value| case key when %r{\A(?:Date|Connection)\z}i next when "rack.hijack"