diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f955c1..eaa0bba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## 0.11.0 [unreleased] +### Bug Fixes + 1. [#105](https://github.com/InfluxCommunity/influxdb3-go/pull/105): Support newlines in tag values. +1. [#106](https://github.com/InfluxCommunity/influxdb3-go/pull/106): Close `resp.Body` after HTTP error response is encountered. ## 0.10.0 [2024-09-13] diff --git a/influxdb3/client.go b/influxdb3/client.go index bf0e95a..4cef56d 100644 --- a/influxdb3/client.go +++ b/influxdb3/client.go @@ -189,7 +189,6 @@ func (c *Client) makeAPICall(ctx context.Context, params httpParams) (*http.Resp if err != nil { return nil, err } - return resp, nil } @@ -199,6 +198,9 @@ func (c *Client) resolveHTTPError(r *http.Response) error { if r.StatusCode >= 200 && r.StatusCode < 300 { return nil } + defer func() { + _ = r.Body.Close() + }() var httpError struct { ServerError