Skip to content

Commit

Permalink
REVERT: Make headers all lowercase in rack middleware (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaffeux committed Jun 20, 2023
1 parent edcc673 commit 0a62abd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
20-06-2023

- Version 4.3.5

- Revert "Make headers all lowercase in rack middleware (#328)".
This seems to have broken MessageBus in production so reverting for now.

- Version 4.3.4

- Revert "FIX: Don't error when trying to write a message to a closed client (#336)".
Expand Down
8 changes: 4 additions & 4 deletions lib/message_bus/rack/middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ def handle_request(env)
return [404, {}, ["not found"]] unless client_id

headers = {}
headers["cache-control"] = "must-revalidate, private, max-age=0"
headers["content-type"] = "application/json; charset=utf-8"
headers["pragma"] = "no-cache"
headers["expires"] = "0"
headers["Cache-Control"] = "must-revalidate, private, max-age=0"
headers["Content-Type"] = "application/json; charset=utf-8"
headers["Pragma"] = "no-cache"
headers["Expires"] = "0"

if @bus.extra_response_headers_lookup
@bus.extra_response_headers_lookup.call(env).each do |k, v|
Expand Down
2 changes: 1 addition & 1 deletion lib/message_bus/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module MessageBus
VERSION = "4.3.4"
VERSION = "4.3.5"
end

0 comments on commit 0a62abd

Please sign in to comment.