Ignore:
Timestamp:
Sep 9, 2022, 8:20:25 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Removed TemplateGenerics package. Generics usage replaced by standard Generics.Collections.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CoolWeb/WebServer/UHTTPSessionFile.pas

    r137 r138  
    5555
    5656procedure THTTPSessionStorageFile.GetSessionId(HandlerData: THTTPHandlerData);
     57var
     58  Value: string;
    5759begin
    5860  with HandlerData do begin
    59     if Request.Cookies.SearchKey(SessionIdCookieName) <> -1 then begin
    60       SessionId := Request.Cookies.Values[SessionIdCookieName];
     61    if Request.Cookies.TryGetValue(SessionIdCookieName, Value) then begin
     62      SessionId := Value;
    6163    end else begin
    6264      SessionId := GetNewSessionId;
    63       Response.Cookies.Values[SessionIdCookieName] := SessionId;
     65      Response.Cookies.Items[SessionIdCookieName] := SessionId;
    6466    end;
    6567  end;
     
    9698    end else raise Exception.Create(SCantCreateSessionStorageDirectory);
    9799
    98     HandlerData.Response.Cookies.Values[SessionIdCookieName] := HandlerData.SessionId;
     100    HandlerData.Response.Cookies.Items[SessionIdCookieName] := HandlerData.SessionId;
    99101  finally
    100102    Lock.Release;
Note: See TracChangeset for help on using the changeset viewer.