浏览代码

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

git-svn-id: trunk@38565 -
michael 7 年之前
父节点
当前提交
b86cd03403
共有 1 个文件被更改,包括 2 次插入2 次删除
  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);