Browse Source

Fixes invalid response header 'Server' value 'Puma' to right value

Zloy 9 years ago
parent
commit
e18a7bb690

+ 1 - 1
frameworks/Ruby/sinatra/hello_world.rb

@@ -30,7 +30,7 @@ settings.filters[:after].clear
 
 after do
   # Add mandatory HTTP headers to every response
-  response['Server'] ||= 'Puma'.freeze
+  response['Server'] ||= ENV['WEB_SERVER'].freeze
   response['Date'] ||= Time.now.to_s
 end
 

+ 1 - 1
frameworks/Ruby/sinatra/run_jruby_puma.sh

@@ -4,4 +4,4 @@ fw_depends rvm jruby-1.7
 
 rvm jruby-$JRUBY_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 
-DB_HOST=${DBHOST} rvm jruby-$JRUBY_VERSION do bundle exec puma -C config/puma.rb &
+WEB_SERVER=Puma DB_HOST=${DBHOST} rvm jruby-$JRUBY_VERSION do bundle exec puma -C config/puma.rb &

+ 1 - 1
frameworks/Ruby/sinatra/run_mri_puma.sh

@@ -4,4 +4,4 @@ fw_depends rvm ruby-2.0
 
 rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 
-DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec puma -C config/puma.rb -w 8 --preload &
+WEB_SERVER=Puma DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec puma -C config/puma.rb -w 8 --preload &

+ 1 - 1
frameworks/Ruby/sinatra/run_rbx_puma.sh

@@ -4,4 +4,4 @@ fw_depends rvm rbx-2.4
 
 rvm rbx-$RBX_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 
-DB_HOST=${DBHOST} rvm rbx-$RBX_VERSION do bundle exec puma &
+WEB_SERVER=Puma DB_HOST=${DBHOST} rvm rbx-$RBX_VERSION do bundle exec puma &

+ 1 - 1
frameworks/Ruby/sinatra/run_thin.sh

@@ -4,4 +4,4 @@ fw_depends rvm ruby-2.0
 
 rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 
-DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec thin start -C config/thin.yml &
+WEB_SERVER=Thin DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec thin start -C config/thin.yml &

+ 1 - 1
frameworks/Ruby/sinatra/run_torqbox.sh

@@ -4,4 +4,4 @@ fw_depends rvm jruby-1.7
 
 rvm jruby-$JRUBY_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 
-DB_HOST=${DBHOST} rvm jruby-$JRUBY_VERSION do bundle exec torqbox -b 0.0.0.0 -E production &
+WEB_SERVER=Torqbox DB_HOST=${DBHOST} rvm jruby-$JRUBY_VERSION do bundle exec torqbox -b 0.0.0.0 -E production &

+ 1 - 1
frameworks/Ruby/sinatra/run_trinidad.sh

@@ -4,4 +4,4 @@ fw_depends rvm jruby-1.7
 
 rvm jruby-$JRUBY_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle
 
-DB_HOST=${DBHOST} rvm jruby-$JRUBY_VERSION do bundle exec trinidad --config config/trinidad.yml &
+WEB_SERVER=Trinidad DB_HOST=${DBHOST} rvm jruby-$JRUBY_VERSION do bundle exec trinidad --config config/trinidad.yml &

+ 1 - 1
frameworks/Ruby/sinatra/run_unicorn.sh

@@ -8,4 +8,4 @@ rvm ruby-$MRI_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path
 
 nginx -c $TROOT/config/nginx.conf
 
-DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec unicorn -E production -c config/unicorn.rb &
+WEB_SERVER=Unicorn DB_HOST=${DBHOST} rvm ruby-$MRI_VERSION do bundle exec unicorn -E production -c config/unicorn.rb &