sensu/sensu-community-plugins — pull request #61 by akahn (2012-08-16 21:04:02+00:00)
Title: Allow setting custom header in check-http.rb

This patch adds an option to `check-http.rb` for setting a custom HTTP header using `--header` or `-H` (these argument names come from curl).

Here at Paperless Post, we want to use this option to make a request to a specific nginx server on localhost that is listening on 'm.example.com', rather than the server listening on 'example.com', also on localhost. It's the equivalent of `curl localhost -H 'Host: m.example.com'`.

With this implementation it's only possible to add one header. I would like to make this work like curl where you can specify `-H` multiple times but I don't think mixlib-cli supports this.