Re: EIdCookieError exceptions

Giganews Newsgroups
Subject: Re: EIdCookieError exceptions
Posted by:  AK (a.kuenz…@consense-gmbh.de)
Date: Tue, 18 Jan 2011

I used your code for the version check but this was not enough. It was also
necessary to modify the way the cookie string was separated (because there
where serveral key-value-pairs divided by ;). Well here is the code (I'm not
proud of it but it works ;o)):

  procedure ReadCookiesFromRequestHeader;
  var
    LRawCookies: TStringList;
    s: string; //AK
  begin
    LRawCookies := TStringList.Create;
    try
      LRequestInfo.RawHeaders.Extract('Cookie', LRawCookies);    {Do not
Localize}
      LRawCookies.LineBreak := ';'; // AK
      s := LRawCookies.Text;        // AK
      LRawCookies.Text := s;        // AK
      LRequestInfo.Cookies.AddClientCookies(LRawCookies);
    finally
      FreeAndNil(LRawCookies);
    end;
  end;

Is there a better way to do this?

cu
AK

"Clayton Arends" <nospam_claytonarends@hotmail.com> schrieb im Newsbeitrag
news:D1E6736876C1E340nospam_claytonarends@hotmail.com...
> "Clayton Arends" <nospam_claytonarends@hotmail.com> wrote in message
> news:8BC943E663C1E340nospam_claytonarends@hotmail.com...
>
>> I am going to change this method back to what it used to be and see if
>> that works (when I have time later tonight).
>
> After reverting this one method my web server is able to function again.
> I will keep checking the snapshots for when this is officially fixed.
>
> Clayton

Replies

In response to

Re: EIdCookieError exceptions posted by Clayton Arends on Fri, 8 Oct 2010