Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to specify --response-code for 3xx codes without specifying -r or --response-code option #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)

## [Unreleased]
### Changed
check-http.rb: Allow to specify `--response-code` for 3xx codes without having to specify `-r` or `--redirect-to` explicitly

## [5.1.0] - 2019-05-06
### Added
Expand Down
2 changes: 1 addition & 1 deletion bin/check-http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def handle_response(res, size, body)
critical "Expected redirect to #{config[:redirectto]} instead redirected to #{res['Location']}" + body
end
end
else
elsif !config[:response_code]
warning res.code + body
end
when /^4/, /^5/
Expand Down