[Bug 381246] Re: check_http adds Port to Host Header (which is a violation of RFC) leading to problems checking certain hosts; current official nagios plugin sources fixes the problem

Thierry Carrez thierry.carrez at ubuntu.com
Tue Jun 2 08:14:48 UTC 2009


Well, adding port to the "Host" header isn't an RFC violation.

RFC2616 says in 14.23 Host
   The Host request-header field specifies the Internet host and port
   number of the resource being requested, as obtained from the original
   URI given by the user or referring resource (generally an HTTP URL,
   as described in section 3.2.2). The Host field value MUST represent
   the naming authority of the origin server or gateway given by the
   original URL. This allows the origin server or gateway to
   differentiate between internally-ambiguous URLs, such as the root "/"
   URL of a server for multiple host names on a single IP address.
       Host = "Host" ":" host [ ":" port ] ; Section 3.2.2

Nagios plugins 1.4.13 fixed it in its 2053 revision so that if it's default port 80 the port part is omitted, which the RFC allows to do. It was done to workaround buggy servers (see
http://sourceforge.net/tracker/?func=detail&aid=2082501&group_id=29880&atid=397597 for details) that don't support the "Host:" header correctly.

I'm not sure support for buggy servers should be considered a bug, and
this will definitely not trigger a hardy SRU. We should move to 1.4.13
though, so I'm keeping this as a wishlist item.

Note: there is a RFC violation in this plugin, though: the "Host" header
shouldn't even be present if you make a HTTP/1.0 request, as it is a
HTTP/1.1 thing.

** Bug watch added: SourceForge.net Tracker #2082501
   http://sourceforge.net/support/tracker.php?aid=2082501

** Changed in: nagios-plugins (Ubuntu)
   Importance: Undecided => Wishlist

** Changed in: nagios-plugins (Ubuntu)
       Status: New => Confirmed

-- 
check_http adds Port to Host Header (which is a violation of RFC) leading to problems checking certain hosts; current official nagios plugin sources fixes the problem
https://bugs.launchpad.net/bugs/381246
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list