Skip to content

Commit 24df6b4

Browse files
alespourCopilot
andauthored
fix: body length for gzip evaluation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 32bfd04 commit 24df6b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/influxdb/v3/client/internal/InfluxDBClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ private <T> void writeData(@Nonnull final List<T> data, @Nonnull final WriteOpti
360360

361361
Map<String, String> headers = new HashMap<>(Map.of("Content-Type", "text/plain; charset=utf-8"));
362362
byte[] body = lineProtocol.getBytes(StandardCharsets.UTF_8);
363-
if (lineProtocol.length() >= options.gzipThresholdSafe(config)) {
363+
if (body.length >= options.gzipThresholdSafe(config)) {
364364
try {
365365
body = gzipData(body);
366366
headers.put("Content-Encoding", "gzip");

0 commit comments

Comments
 (0)