[AWS] Possible 'cookie' problem (AWS.Client.Parse_Header) ?

Pascal Obry p.obry@wanadoo.fr
Tue, 29 Jul 2003 18:45:05 +0200


Charles,

 >     I changed the code to:
 > 
 > 
 >    procedure Parse_Header (...) is
 >       ...
 >    begin
 >       ...
 >       declare
 >          The_Cookie : Unbounded_String 
 >                     := +Response.Header (Answer,
 >                                          Messages.Set_Cookie_Token);
 >       begin
 >          if The_Cookie /= "" then
 >             Connection.Cookie := The_Cookie;
 >          end if;
 >       end;
 >       ...
 >    end Parse_Header;

This is the right fix and it has already been fixed in AWS 1.4w. Here is the
fix we have put :

      declare
         Set_Cookie : constant String
           := Response.Header (Answer, Messages.Set_Cookie_Token);
      begin
         --  Set the new cookie, only if the server sent Set-Cookie
         --  header line.

         if Set_Cookie /= "" then
            Connection.Cookie := +Set_Cookie;
         end if;
      end;

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595