File tree 4 files changed +15
-2
lines changed
4 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
## 4.0.0 [ unreleased]
2
2
3
+ ### Bug Fixes
4
+ 1 . [ #297 ] ( https://github.com/influxdata/influxdb-client-csharp/pull/297 ) : Get version from ` X-Influxdb-Version ` header
5
+
3
6
## 4.0.0-rc3 [ 2022-03-04]
4
7
5
8
### Features
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ private string GetVersion(RestResponse responseHttp)
49
49
Arguments . CheckNotNull ( responseHttp , "responseHttp" ) ;
50
50
51
51
var value = responseHttp . Headers
52
- . Where ( header => header . Name . Equals ( "X-Influxdb-Version" ) )
52
+ . Where ( header => header . Name . Equals ( "X-Influxdb-Version" , StringComparison . OrdinalIgnoreCase ) )
53
53
. Select ( header => header . Value . ToString ( ) )
54
54
. FirstOrDefault ( ) ;
55
55
Original file line number Diff line number Diff line change @@ -319,5 +319,15 @@ public void HttpClientIsDisposed()
319
319
320
320
Assert . AreEqual ( true , disposed ) ;
321
321
}
322
+
323
+ [ Test ]
324
+ public async Task VersionIsNotCaseSensitive ( )
325
+ {
326
+ MockServer . Given ( Request . Create ( ) . WithPath ( "/ping" ) . UsingGet ( ) )
327
+ . RespondWith ( Response . Create ( ) . WithStatusCode ( 204 )
328
+ . WithHeader ( "x-influxdb-version" , "2.0.0" ) ) ;
329
+
330
+ Assert . AreEqual ( "2.0.0" , await _client . VersionAsync ( ) ) ;
331
+ }
322
332
}
323
333
}
Original file line number Diff line number Diff line change @@ -443,7 +443,7 @@ public async Task<string> VersionAsync()
443
443
}
444
444
445
445
/// <summary>
446
- /// The readiness of the InfluxDB 2.0.
446
+ /// Check the readiness of InfluxDB Server at startup. It is not supported by InfluxDB Cloud.
447
447
/// </summary>
448
448
/// <returns>return null if the InfluxDB is not ready</returns>
449
449
public async Task < Ready > ReadyAsync ( )
You can’t perform that action at this time.
0 commit comments