Skip to content

Commit 9999a4f

Browse files
committed
[ruby/sinatra] Only set headers not created by servers
+--------------------------------+-----+-----+-----+------+-------+---------+--------------+ | branch_name| json| db|query|update|fortune|plaintext|weighted_score| +--------------------------------+-----+-----+-----+------+-------+---------+--------------+ | master|62219|24663| 8786| 6706| 20755| 62218| 849| |sinatra/remove-redundant-headers|76413|31652|13103| 6976| 19379| 60110| 982| +--------------------------------+-----+-----+-----+------+-------+---------+--------------+
1 parent 523534b commit 9999a4f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

frameworks/Ruby/sinatra-sequel/hello_world.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def rand1
3333

3434
after do
3535
response['Date'] = Time.now.httpdate
36-
end
36+
end if defined?(Falcon) || defined?(Puma)
3737

3838
after do
3939
response['Server'] = SERVER_STRING

frameworks/Ruby/sinatra/hello_world.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def rand1
3333

3434
after do
3535
response['Date'] = Time.now.httpdate
36-
end
36+
end if defined?(Falcon) || defined?(Puma)
3737

3838
after do
3939
response['Server'] = SERVER_STRING

0 commit comments

Comments
 (0)