Selaa lähdekoodia

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

git-svn-id: trunk@38565 -
michael 7 vuotta sitten
vanhempi
commit
b86cd03403
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      packages/fcl-web/src/base/fphttpclient.pp

+ 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);