File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,11 @@ def get_benchmark_routes(app_dir)
140140# Helper method to check if server is responding
141141def server_responding? ( uri )
142142 response = Net ::HTTP . get_response ( uri )
143- { success : response . is_a? ( Net ::HTTPSuccess ) , info : "HTTP #{ response . code } #{ response . message } " }
143+ # Accept both success (2xx) and redirect (3xx) responses as "server is responding"
144+ success = response . is_a? ( Net ::HTTPSuccess ) || response . is_a? ( Net ::HTTPRedirection )
145+ info = "HTTP #{ response . code } #{ response . message } "
146+ info += " -> #{ response [ 'location' ] } " if response . is_a? ( Net ::HTTPRedirection ) && response [ "location" ]
147+ { success : success , info : info }
144148rescue StandardError => e
145149 { success : false , info : "#{ e . class . name } : #{ e . message } " }
146150end
You can’t perform that action at this time.
0 commit comments