From 525cb0abc1fa8b3d4e3cc628159d68217437f782 Mon Sep 17 00:00:00 2001 From: Stefan Engstrom Date: Fri, 19 Feb 2016 10:31:00 -0600 Subject: [PATCH 1/2] add accept header */* for agent check --- command/agent/check.go | 1 + 1 file changed, 1 insertion(+) diff --git a/command/agent/check.go b/command/agent/check.go index c3210f7b64..7255357be2 100644 --- a/command/agent/check.go +++ b/command/agent/check.go @@ -391,6 +391,7 @@ func (c *CheckHTTP) check() { } req.Header.Set("User-Agent", HttpUserAgent) + req.Header.Set("Accept", "*/*") resp, err := c.httpClient.Do(req) if err != nil { From 4cb16808f4fc16e34b72463d070152fed03d9367 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Wed, 9 Mar 2016 21:11:20 -0800 Subject: [PATCH 2/2] Adds default set of accept headers for HTTP checks. --- command/agent/check.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/agent/check.go b/command/agent/check.go index 7255357be2..87de968106 100644 --- a/command/agent/check.go +++ b/command/agent/check.go @@ -391,7 +391,7 @@ func (c *CheckHTTP) check() { } req.Header.Set("User-Agent", HttpUserAgent) - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "text/plain, text/*, */*") resp, err := c.httpClient.Do(req) if err != nil {