THRIFT-5586 User-Agent header not conforming to RFC 7231
Client: Delphi
Patch: Jens Geyer
diff --git a/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas b/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas
index 398e275..b0c7acd 100644
--- a/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas
+++ b/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas
@@ -127,7 +127,7 @@
Result.open('POST', FUri, False, '', '');
Result.setRequestHeader( 'Content-Type', THRIFT_MIMETYPE);
Result.setRequestHeader( 'Accept', THRIFT_MIMETYPE);
- Result.setRequestHeader( 'User-Agent', 'Delphi/IHTTPClient');
+ Result.setRequestHeader( 'User-Agent', 'ApacheThriftDelphi/msxml');
for pair in FCustomHeaders do begin
Result.setRequestHeader( pair.Key, pair.Value );
diff --git a/lib/delphi/src/Thrift.Transport.WinHTTP.pas b/lib/delphi/src/Thrift.Transport.WinHTTP.pas
index 746611d..87a2309 100644
--- a/lib/delphi/src/Thrift.Transport.WinHTTP.pas
+++ b/lib/delphi/src/Thrift.Transport.WinHTTP.pas
@@ -151,7 +151,7 @@
url := TWinHTTPUrlImpl.Create( FUri);
info := TErrorInfo.WinHTTPSession;
- session := TWinHTTPSessionImpl.Create('Apache Thrift Delphi WinHTTP');
+ session := TWinHTTPSessionImpl.Create('ApacheThriftDelphi/WinHTTP');
session.EnableSecureProtocols( SecureProtocolsAsWinHTTPFlags);
info := TErrorInfo.WinHTTPConnection;