diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e007b99..e50896d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ This release introduces a support for new version of InfluxDB API definitions wi ### Bug Fixes 1. [#583](https://github.com/influxdata/influxdb-client-python/pull/583): Async HTTP client doesn't always use `HTTP_PROXY`/`HTTPS_PROXY` environment variables. [async/await] 1. [#584](https://github.com/influxdata/influxdb-client-python/pull/584): Parsing empty query result value as `numpy.NaN` +1. [#595](https://github.com/influxdata/influxdb-client-python/pull/595): The `Config-Encoding: identity` header will no longer be set by the `write_api` calls to a remote server ## 1.36.1 [2023-02-23] diff --git a/influxdb_client/client/write_api.py b/influxdb_client/client/write_api.py index bf8da230..61242446 100644 --- a/influxdb_client/client/write_api.py +++ b/influxdb_client/client/write_api.py @@ -507,7 +507,7 @@ def _retry_callback_delegate(exception): def _post_write(self, _async_req, bucket, org, body, precision, **kwargs): return self._write_service.post_write(org=org, bucket=bucket, body=body, precision=precision, - async_req=_async_req, content_encoding="identity", + async_req=_async_req, content_type="text/plain; charset=utf-8", **kwargs) diff --git a/influxdb_client/client/write_api_async.py b/influxdb_client/client/write_api_async.py index e0ba021d..2f32802f 100644 --- a/influxdb_client/client/write_api_async.py +++ b/influxdb_client/client/write_api_async.py @@ -120,6 +120,6 @@ async def write(self, bucket: str, org: str = None, body = b'\n'.join(payloads[write_precision]) response = await self._write_service.post_write_async(org=org, bucket=bucket, body=body, precision=write_precision, async_req=False, - content_encoding="identity", _return_http_data_only=False, + _return_http_data_only=False, content_type="text/plain; charset=utf-8") return response[1] == 204 diff --git a/tests/test_gzip.py b/tests/test_gzip.py index c37d7733..b847d370 100644 --- a/tests/test_gzip.py +++ b/tests/test_gzip.py @@ -60,7 +60,6 @@ def test_gzip_disabled(self): self.assertEqual("identity", _requests[0].headers['Accept-Encoding']) # Write self.assertEqual("/api/v2/write?org=my-org&bucket=my-bucket&precision=ns", _requests[1].path) - self.assertEqual("identity", _requests[1].headers['Content-Encoding']) self.assertEqual("identity", _requests[1].headers['Accept-Encoding']) self.assertEqual("h2o_feet,location=coyote_creek water_level=1 1", _requests[1].parsed_body) # Query