File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
modules/auxiliary/admin/http Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,7 @@ def run
5858 unless res
5959 fail_with ( Failure ::Unreachable , 'Failed to receive a reply from the server.' )
6060 end
61- case res . code
62- when 200
61+ if res . code == 200
6362 print_good ( 'Server reachable.' )
6463 else
6564 fail_with ( Failure ::UnexpectedReply , 'Unexpected reply from the target.' )
@@ -115,8 +114,7 @@ def run
115114 unless res
116115 fail_with ( Failure ::Unreachable , 'Failed to receive a reply from the server.' )
117116 end
118- case res . code
119- when 200
117+ if res . code == 200
120118 json = res . get_json_document
121119 if json . key? ( 'error_message' )
122120 fail_with ( Failure ::UnexpectedReply , json [ 'error_message' ] )
@@ -147,8 +145,7 @@ def run
147145 fail_with ( Failure ::Unreachable , 'Failed to receive a reply from the server.' )
148146 end
149147
150- case res . code
151- when 200
148+ if res . code == 200
152149 json = res . get_json_document
153150 if json . key? ( 'error_message' )
154151 fail_with ( Failure ::UnexpectedReply , json [ 'error_message' ] )
You can’t perform that action at this time.
0 commit comments