Skip to content

Commit 9c6119b

Browse files
committed
remove redudant readonly user agent
1 parent 0f70d05 commit 9c6119b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

csharp/src/Drivers/Apache/Spark/SparkHttpConnection.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ namespace Apache.Arrow.Adbc.Drivers.Apache.Spark
3535
{
3636
internal class SparkHttpConnection : SparkConnection
3737
{
38-
private static readonly string s_baseUserAgent = $"{DriverName.Replace(" ", "")}/{ProductVersionDefault}";
3938
private const string BasicAuthenticationScheme = "Basic";
4039
private const string BearerAuthenticationScheme = "Bearer";
4140

@@ -258,7 +257,7 @@ private string GetUserAgent()
258257
// Build the base user agent string with Thrift version
259258
string thriftVersion = GetThriftVersion();
260259
string thriftComponent = string.IsNullOrEmpty(thriftVersion) ? "Thrift" : $"Thrift/{thriftVersion}";
261-
string baseUserAgent = $"{DriverName.Replace(" ", "")}/{ProductVersionDefault} {thriftComponent}"; // consider using ProductVersion instead of ProductVersionDefault
260+
string baseUserAgent = $"{DriverName.Replace(" ", "")}/{ProductVersion} {thriftComponent}";
262261

263262
// Check if a client has provided a user-agent entry
264263
if (Properties.TryGetValue(SparkParameters.UserAgentEntry, out string? userAgentEntry) && !string.IsNullOrWhiteSpace(userAgentEntry))

0 commit comments

Comments
 (0)