diff --git a/lib/netstd/Thrift/Transport/Client/THttpTransport.cs b/lib/netstd/Thrift/Transport/Client/THttpTransport.cs
index 0dd5493..627c93d 100644
--- a/lib/netstd/Thrift/Transport/Client/THttpTransport.cs
+++ b/lib/netstd/Thrift/Transport/Client/THttpTransport.cs
@@ -1,4 +1,4 @@
-﻿// Licensed to the Apache Software Foundation(ASF) under one
+// Licensed to the Apache Software Foundation(ASF) under one
 // or more contributor license agreements.See the NOTICE file
 // distributed with this work for additional information
 // regarding copyright ownership.The ASF licenses this file
@@ -41,23 +41,29 @@
         private bool _isDisposed;
         private MemoryStream _outputStream = new MemoryStream();
 
-        public THttpTransport(Uri u, IDictionary<string, string> customHeaders = null)
-            : this(u, Enumerable.Empty<X509Certificate>(), customHeaders)
+        public THttpTransport(Uri u, IDictionary<string, string> customHeaders = null, string userAgent = null)
+            : this(u, Enumerable.Empty<X509Certificate>(), customHeaders, userAgent)
         {
         }
 
         public THttpTransport(Uri u, IEnumerable<X509Certificate> certificates,
-            IDictionary<string, string> customHeaders)
+            IDictionary<string, string> customHeaders, string userAgent = null)
         {
             _uri = u;
             _certificates = (certificates ?? Enumerable.Empty<X509Certificate>()).ToArray();
             CustomHeaders = customHeaders;
 
+            if (!string.IsNullOrEmpty(userAgent))
+                UserAgent = userAgent;
+
             // due to current bug with performance of Dispose in netcore https://github.com/dotnet/corefx/issues/8809
             // this can be switched to default way (create client->use->dispose per flush) later
             _httpClient = CreateClient();
         }
 
+        // According to RFC 2616 section 3.8, the "User-Agent" header may not carry a version number
+        public readonly string UserAgent = "Thrift netstd THttpClient";
+
         public IDictionary<string, string> CustomHeaders { get; }
 
         public int ConnectTimeout
@@ -149,7 +155,7 @@
             }
 
             httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/x-thrift"));
-            httpClient.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("THttpTransport", "1.0.0"));
+            httpClient.DefaultRequestHeaders.UserAgent.TryParseAdd(UserAgent);
 
             if (CustomHeaders != null)
             {
@@ -223,4 +229,4 @@
             _isDisposed = true;
         }
     }
-}
\ No newline at end of file
+}
