We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
redirect
1 parent 25fb001 commit b37eab0Copy full SHA for b37eab0
1 file changed
lib/sinatra/base.rb
@@ -308,9 +308,7 @@ def block.each; yield(call) end
308
309
# Halt processing and redirect to the URI provided.
310
def redirect(uri, *args)
311
- # SERVER_PROTOCOL is required in Rack 3, fall back to HTTP_VERSION
312
- # for servers not updated for Rack 3 (like Puma 5)
313
- http_version = env['SERVER_PROTOCOL'] || env['HTTP_VERSION']
+ http_version = env['SERVER_PROTOCOL']
314
if (http_version == 'HTTP/1.1') && (env['REQUEST_METHOD'] != 'GET')
315
status 303
316
else
0 commit comments