Changeset 138 for trunk/Packages/CoolWeb/WebServer/UHTTPSessionFile.pas
- Timestamp:
- Sep 9, 2022, 8:20:25 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CoolWeb/WebServer/UHTTPSessionFile.pas
r137 r138 55 55 56 56 procedure THTTPSessionStorageFile.GetSessionId(HandlerData: THTTPHandlerData); 57 var 58 Value: string; 57 59 begin 58 60 with HandlerData do begin 59 if Request.Cookies. SearchKey(SessionIdCookieName) <> -1then begin60 SessionId := Request.Cookies.Values[SessionIdCookieName];61 if Request.Cookies.TryGetValue(SessionIdCookieName, Value) then begin 62 SessionId := Value; 61 63 end else begin 62 64 SessionId := GetNewSessionId; 63 Response.Cookies. Values[SessionIdCookieName] := SessionId;65 Response.Cookies.Items[SessionIdCookieName] := SessionId; 64 66 end; 65 67 end; … … 96 98 end else raise Exception.Create(SCantCreateSessionStorageDirectory); 97 99 98 HandlerData.Response.Cookies. Values[SessionIdCookieName] := HandlerData.SessionId;100 HandlerData.Response.Cookies.Items[SessionIdCookieName] := HandlerData.SessionId; 99 101 finally 100 102 Lock.Release;
Note:
See TracChangeset
for help on using the changeset viewer.