Skip to content

queryApi.QueryAsync returns GZipped request #310

@sunserg

Description

@sunserg

It seems that when Gzip compression is enabled, the responce is not unzipped.

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

  1. Connect to Influx and enable GZip:
 var client = InfluxDBClientFactory.Create(options).EnableGzip();
 var queryApi = client.GetQueryApi();
 var query = $"from(bucket:\"{_bucket}\") |> range(start: {fromDate:O}) |> last()";
 var tables = await _queryApi.QueryAsync(query, _org, cancellationToken);

Expected behavior:
List<FluxTables?> returned.

Actual behavior:
Exception:

CsvHelper.BadDataException: You can ignore bad data by setting BadDataFound to null.
IReader state:
   ColumnCount: 0
   CurrentIndex: -1
   HeaderRecord:

IParser state:
   ByteCount: 0
   CharCount: 202
   Row: 1
   RawRow: 1
   Count: 3
   RawRecord:
▼????k?J►??♠?§??????t{??S %M    ?"T?6♠?Nm)?????M☼?:HB?gw?????q???????|?▼wn:↔w?]▼?0????t???g?????}??/?????<??0]????☼_⌂??W7c?♫?4??\.oO??+?▼???_???L??☼e?,?r(?????P??0-o??♫??~,ô?_?<????^9?????>???=??


   at InfluxDB.Client.Core.Internal.AbstractQueryClient.<>c.<.cctor>b__26_1(Exception e)
   at InfluxDB.Client.Core.Internal.AbstractQueryClient.Query(Func`2 queryFn, Action`1 consumer, Action`1 onError, Action onComplete, CancellationToken cancellationToken)
   at InfluxDB.Client.QueryApi.QueryAsync(Query query, String org, CancellationToken cancellationToken)
...

Specifications:

  • Client Version: 4.1.0
  • InfluxDB Version: 2.0.7
  • Platform: Client: Windows, server: Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions