[Nagiosplug-help] check_http HTTP Version
Holger Weiß
holger at CIS.FU-Berlin.DE
Wed Sep 14 22:09:54 CEST 2011
* Franz, Jay <Jay.Franz at ssa.gov> [2011-09-14 12:43]:
> > Try using -H and supplying a host that does 1.1 requests for me...
>
> [...]
>
> Understanding that it now works, I am not sure that I understand why. I
> thought that the -H option was for virtual hosts? And, why would it
> work with both "$HOSTNAME$" and "$HOSTADDRESS$"? That is, from the
> plug-in's point of view, what is the difference between -I
> "$HOSTADDRESS$" and -H "$HOSTADDRESS$"?
The -I option tells the plugin which host to connect to (as the -H
option of other plugins). The -H option tells the plugin to set the
"Host" header field of the client request to the specified string, which
indeed is required to check virtual hosts.¹ The HTTP/1.0 protocol
doesn't define such a header field, so the plugin uses HTTP/1.1 when -H
is specified.
Holger
¹ See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23
More information about the Help
mailing list