Browse Source

* Position stream on start

Michaël Van Canneyt 3 years ago
parent
commit
8360b18097
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/fcl-web/src/base/fpwebclient.pp

+ 2 - 0
packages/fcl-web/src/base/fpwebclient.pp

@@ -349,6 +349,8 @@ begin
       LogRequest(AMethod,AURL,ARequest);
       LogRequest(AMethod,AURL,ARequest);
     try
     try
       Result:=DoHTTPMethod(AMethod,AURL,ARequest);
       Result:=DoHTTPMethod(AMethod,AURL,ARequest);
+      if Assigned(Result) and Assigned(Result.FStream) then
+        Result.FStream.Position:=0;
     except
     except
       if (P=PMin) then
       if (P=PMin) then
         Raise;
         Raise;