readd server_port

This commit is contained in:
Jan Wagner 2008-09-22 12:46:42 +00:00
parent b5bfa65b34
commit 7d50ab9177
2 changed files with 3 additions and 2 deletions

3
debian/changelog vendored
View file

@ -1,6 +1,7 @@
nagios-plugins (1.4.12-4) UNRELEASED; urgency=low
* NOT RELEASED YET
* add server_port back to 41_check_http_fix_http_header.dpatch,
patch was incomplete
-- Jan Wagner <waja@cyconet.org> Sun, 24 Aug 2008 07:40:12 +0200

View file

@ -17,7 +17,7 @@ diff -urNad nagios-plugins-1.4.12~/plugins/check_http.c nagios-plugins-1.4.12/pl
+ * Useragent. This fixes an issue with getting 301 responses from servers
+ * with virtual hosts */
+ if (host_name)
+ asprintf (&buf, "%s %s HTTP/1.1\r\nHost: %s\r\n%s\r\n", http_method, server_url, host_name, user_agent);
+ asprintf (&buf, "%s %s HTTP/1.1\r\nHost: %s:%d\r\n%s\r\n", http_method, server_url, host_name, server_port, user_agent);
+ else
+ asprintf (&buf, "%s %s HTTP/1.0\r\n%s\r\n", http_method, server_url, user_agent);