File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ class HelloWorld < Sinatra::Base
1313 QUERIES_MIN = 1
1414 QUERIES_MAX = 500
1515
16+ DATE_HEADER = 'Date'
17+ SERVER_HEADER = 'Server'
1618 SERVER_STRING = 'Sinatra'
1719
1820 configure do
@@ -49,12 +51,12 @@ def rand1
4951
5052 if defined? ( Puma )
5153 after do
52- response [ 'Server' ] = SERVER_STRING
53- response [ 'Date' ] = Time . now . httpdate
54+ response [ SERVER_HEADER ] = SERVER_STRING
55+ response [ DATE_HEADER ] = Time . now . httpdate
5456 end
5557 else
5658 after do
57- response [ 'Server' ] = SERVER_STRING
59+ response [ SERVER_HEADER ] = SERVER_STRING
5860 end
5961 end
6062
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ class HelloWorld < Sinatra::Base
1313 QUERIES_MIN = 1
1414 QUERIES_MAX = 500
1515
16+ DATE_HEADER = 'Date'
17+ SERVER_HEADER = 'Server'
1618 SERVER_STRING = 'Sinatra'
1719
1820 configure do
@@ -49,12 +51,12 @@ def rand1
4951
5052 if defined? ( Puma )
5153 after do
52- response [ 'Server' ] = SERVER_STRING
53- response [ 'Date' ] = Time . now . httpdate
54+ response [ SERVER_HEADER ] = SERVER_STRING
55+ response [ DATE_HEADER ] = Time . now . httpdate
5456 end
5557 else
5658 after do
57- response [ 'Server' ] = SERVER_STRING
59+ response [ SERVER_HEADER ] = SERVER_STRING
5860 end
5961 end
6062
You can’t perform that action at this time.
0 commit comments