View Issue Details

IDProjectCategoryView StatusLast Update
0033451FPCFCLpublic2018-04-08 18:32
ReporterengkinAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionProduct Build 
Target Version3.2.0Fixed in Version3.1.1 
Summary0033451: [Patch] FPHTTPClient keeps the last cookie only
DescriptionWhen FPHTTPClient receives a response that has a group of set-cookie headers it clears FCookies on every set-cookie instead of accumulating them all in the same response.

Attached is a patch to fix this bug.
Additional Informationhttp://forum.lazarus.freepascal.org/index.php/topic,40516.0.html
TagsNo tags attached.
Fixed in Revision38565
FPCOldBugId
FPCTarget
Attached Files
  • patch.diff (529 bytes)
    Index: fphttpclient.pp
    ===================================================================
    --- fphttpclient.pp	(revision 38562)
    +++ fphttpclient.pp	(working copy)
    @@ -816,8 +816,6 @@
         C : String;
     
       begin
    -    If Assigned(FCookies) then
    -      FCookies.Clear;
         P:=Pos(':',S);
         System.Delete(S,1,P);
         Repeat
    @@ -837,6 +835,8 @@
       StatusLine,S : String;
     
     begin
    +  If Assigned(FCookies) then
    +    FCookies.Clear;
       if not ReadString(StatusLine) then
         Exit(0);
       Result:=ParseStatusLine(StatusLine);
    
    patch.diff (529 bytes)

Activities

engkin

2018-03-18 14:54

reporter  

patch.diff (529 bytes)
Index: fphttpclient.pp
===================================================================
--- fphttpclient.pp	(revision 38562)
+++ fphttpclient.pp	(working copy)
@@ -816,8 +816,6 @@
     C : String;
 
   begin
-    If Assigned(FCookies) then
-      FCookies.Clear;
     P:=Pos(':',S);
     System.Delete(S,1,P);
     Repeat
@@ -837,6 +835,8 @@
   StatusLine,S : String;
 
 begin
+  If Assigned(FCookies) then
+    FCookies.Clear;
   if not ReadString(StatusLine) then
     Exit(0);
   Result:=ParseStatusLine(StatusLine);
patch.diff (529 bytes)

Michael Van Canneyt

2018-03-18 17:28

administrator   ~0107242

Fixed, thanks for the patch !

Issue History

Date Modified Username Field Change
2018-03-18 14:54 engkin New Issue
2018-03-18 14:54 engkin File Added: patch.diff
2018-03-18 17:28 Michael Van Canneyt Fixed in Revision => 38565
2018-03-18 17:28 Michael Van Canneyt Note Added: 0107242
2018-03-18 17:28 Michael Van Canneyt Status new => resolved
2018-03-18 17:28 Michael Van Canneyt Fixed in Version => 3.1.1
2018-03-18 17:28 Michael Van Canneyt Resolution open => fixed
2018-03-18 17:28 Michael Van Canneyt Assigned To => Michael Van Canneyt
2018-03-18 17:28 Michael Van Canneyt Target Version => 3.2.0
2018-04-08 18:32 engkin Status resolved => closed