Browse Source

* Reset request stream position in case of a Location and 302 status retry. (bug ID 32410)

git-svn-id: trunk@37269 -
michael 8 years ago
parent
commit
06563f73f6
1 changed files with 4 additions and 0 deletions
  1. 4 0
      packages/fcl-web/src/base/fphttpclient.pp

+ 4 - 0
packages/fcl-web/src/base/fphttpclient.pp

@@ -1391,7 +1391,11 @@ begin
         FOnPassword(Self,RR);
         FOnPassword(Self,RR);
       end
       end
     else
     else
+      begin
       RR:=AllowRedirect and IsRedirect(FResponseStatusCode) and (L<>'');
       RR:=AllowRedirect and IsRedirect(FResponseStatusCode) and (L<>'');
+      if RR and Assigned(FRequestBody) and (FRequestBody.Size>0) then
+        FRequestBody.Position:=0;
+      end;
   until Terminated or not RR ;
   until Terminated or not RR ;
 end;
 end;