summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Geyer <jensg@apache.org>2022-06-01 22:06:29 +0200
committerJens Geyer <jensg@apache.org>2022-06-01 22:30:59 +0200
commitaad75837f4e12a9b37fd38bee51b96df595997d8 (patch)
treef1b42b8aa2aa272d0d100ac7f8187a792cb34ef5
parent7a182feb4d523cf8ae6207fd21fd9c7bd054f269 (diff)
downloadthrift-aad75837f4e12a9b37fd38bee51b96df595997d8.tar.gz
THRIFT-5586 User-Agent header not conforming to RFC 7231
Client: Delphi Patch: Jens Geyer
-rw-r--r--lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas2
-rw-r--r--lib/delphi/src/Thrift.Transport.WinHTTP.pas2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas b/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas
index 398e2757c..b0c7acd22 100644
--- a/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas
+++ b/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas
@@ -127,7 +127,7 @@ begin
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 746611d01..87a230996 100644
--- a/lib/delphi/src/Thrift.Transport.WinHTTP.pas
+++ b/lib/delphi/src/Thrift.Transport.WinHTTP.pas
@@ -151,7 +151,7 @@ begin
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;