diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-03-17 05:53:00 (GMT) |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-03-17 05:53:00 (GMT) |
commit | 16030bc497668f36b53982192f67a60d0c8d18a4 (patch) | |
tree | 3c934b881c145a17bbb56f5bd5a45d90a5db9fd4 /plugins/check_http.c | |
parent | c3c528952d593dea59c2b6dcee05bab625db307a (diff) | |
download | monitoring-plugins-16030bc497668f36b53982192f67a60d0c8d18a4.tar.gz |
Fix check_http sending HTTP/1.0 with v1.1 headers (#2638765)
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r-- | plugins/check_http.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index 248c0f9..2f2460c 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c | |||
@@ -794,7 +794,7 @@ check_http (void) | |||
794 | } | 794 | } |
795 | #endif /* HAVE_SSL */ | 795 | #endif /* HAVE_SSL */ |
796 | 796 | ||
797 | asprintf (&buf, "%s %s HTTP/1.0\r\n%s\r\n", http_method, server_url, user_agent); | 797 | asprintf (&buf, "%s %s %s\r\n%s\r\n", http_method, server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent); |
798 | 798 | ||
799 | /* tell HTTP/1.1 servers not to keep the connection alive */ | 799 | /* tell HTTP/1.1 servers not to keep the connection alive */ |
800 | asprintf (&buf, "%sConnection: close\r\n", buf); | 800 | asprintf (&buf, "%sConnection: close\r\n", buf); |