2
0
Эх сурвалжийг харах

* Fix for bug #33451: Set-Cookie only keeps last cookie, patch by engkin

git-svn-id: trunk@38565 -
michael 7 жил өмнө
parent
commit
b86cd03403

+ 2 - 2
packages/fcl-web/src/base/fphttpclient.pp

@@ -816,8 +816,6 @@ function TFPCustomHTTPClient.ReadResponseHeaders: integer;
     C : String;
 
   begin
-    If Assigned(FCookies) then
-      FCookies.Clear;
     P:=Pos(':',S);
     System.Delete(S,1,P);
     Repeat
@@ -837,6 +835,8 @@ Var
   StatusLine,S : String;
 
 begin
+  If Assigned(FCookies) then
+    FCookies.Clear;
   if not ReadString(StatusLine) then
     Exit(0);
   Result:=ParseStatusLine(StatusLine);