From 947db270cd3ebad5f3a7634bbf254a8258870f64 Mon Sep 17 00:00:00 2001 From: "Greg Westerfield, Jr" Date: Tue, 14 Mar 2023 12:21:46 -0400 Subject: [PATCH] Don't override count value if passed to BuildSplunkURL --- client/client.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index 9d1c0c47..cb2a5d09 100644 --- a/client/client.go +++ b/client/client.go @@ -83,7 +83,11 @@ func (c *Client) BuildSplunkURL(queryValues url.Values, urlPathParts ...string) } queryValues.Set("output_mode", "json") - queryValues.Set("count", "-1") // To avoid http response truncation + + if !queryValues.Has("count") { + queryValues.Set("count", "-1") // To avoid http response truncation + } + httpScheme := getEnv(envVarHTTPScheme, defaultScheme) return url.URL{