Skip to content

Commit dea6dec

Browse files
authored
fix: remove Content-Encoding=Identity as the header as it violates the RFC (influxdata#595)
1 parent 992ff7c commit dea6dec

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ This release introduces a support for new version of InfluxDB API definitions wi
2929
### Bug Fixes
3030
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]
3131
1. [#584](https://github.com/influxdata/influxdb-client-python/pull/584): Parsing empty query result value as `numpy.NaN`
32+
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
3233

3334
## 1.36.1 [2023-02-23]
3435

Diff for: influxdb_client/client/write_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def _retry_callback_delegate(exception):
507507
def _post_write(self, _async_req, bucket, org, body, precision, **kwargs):
508508

509509
return self._write_service.post_write(org=org, bucket=bucket, body=body, precision=precision,
510-
async_req=_async_req, content_encoding="identity",
510+
async_req=_async_req,
511511
content_type="text/plain; charset=utf-8",
512512
**kwargs)
513513

Diff for: influxdb_client/client/write_api_async.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,6 @@ async def write(self, bucket: str, org: str = None,
120120
body = b'\n'.join(payloads[write_precision])
121121
response = await self._write_service.post_write_async(org=org, bucket=bucket, body=body,
122122
precision=write_precision, async_req=False,
123-
content_encoding="identity", _return_http_data_only=False,
123+
_return_http_data_only=False,
124124
content_type="text/plain; charset=utf-8")
125125
return response[1] == 204

Diff for: tests/test_gzip.py

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def test_gzip_disabled(self):
6060
self.assertEqual("identity", _requests[0].headers['Accept-Encoding'])
6161
# Write
6262
self.assertEqual("/api/v2/write?org=my-org&bucket=my-bucket&precision=ns", _requests[1].path)
63-
self.assertEqual("identity", _requests[1].headers['Content-Encoding'])
6463
self.assertEqual("identity", _requests[1].headers['Accept-Encoding'])
6564
self.assertEqual("h2o_feet,location=coyote_creek water_level=1 1", _requests[1].parsed_body)
6665
# Query

0 commit comments

Comments
 (0)