Skip to content

Commit edb9056

Browse files
byrootMSP-Greg
andcommitted
Use Rack's SERVER_PROTOCOL instead of HTTP_VERSION header
Fix: rails#53925 Ref: rack/rack#1883 This will prevent issues with future version of rack and/or servers. Co-Authored-By: MSP-Greg <[email protected]>
1 parent 544c90c commit edb9056

File tree

1 file changed

+1
-1
lines changed
  • actionpack/lib/action_controller/metal

1 file changed

+1
-1
lines changed

actionpack/lib/action_controller/metal/live.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ module Live
5858

5959
module ClassMethods
6060
def make_response!(request)
61-
if request.get_header("HTTP_VERSION") == "HTTP/1.0"
61+
if (request.get_header("SERVER_PROTOCOL") || request.get_header("HTTP_VERSION")) == "HTTP/1.0"
6262
super
6363
else
6464
Live::Response.new.tap do |res|

0 commit comments

Comments
 (0)