Changeset 87 for branches/DirectWeb/UWebServer.pas
- Timestamp:
- Dec 17, 2009, 9:36:15 AM (15 years ago)
- Location:
- branches/DirectWeb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DirectWeb
- Property svn:ignore
-
old new 3 3 WoWHostingWebServer 4 4 Config.xml 5 Session
-
- Property svn:ignore
-
branches/DirectWeb/UWebServer.pas
r86 r87 6 6 7 7 uses 8 Classes, SysUtils, UHTTPServer, 8 Classes, SysUtils, UHTTPServer, UHTTPSessionFile, 9 9 UTCPServer, 10 10 UCommon, … … 21 21 TWebServer = class 22 22 private 23 HTTPSessionFile: THTTPSessionFile; 23 24 function PagesList(URL: string; Page, TotalCount, CountPerPage: Integer 24 25 ): string; … … 244 245 with Response.Stream do begin 245 246 Response.Cookies.Values['Test'] := 'Halo'; 247 //Response.Cookies.Values['Test2'] := 'Halo2'; 248 249 HTTPServer.SessionHandler.Variables.Values['Session1'] := 'Value1'; 250 //HTTPServer.SessionHandler.Variables.Values['Session2'] := 'Value2'; 246 251 247 252 WriteString('<a href="?ServerInfo">Refresh</a>'); 248 253 249 254 WriteString('<h5>Request HTTP headers</h5>'); 250 251 255 for I := 0 to Request.Headers.Count - 1 do begin; 252 256 WriteString(Request.Headers.Strings[I] + '<br/>'); 257 end; 258 259 WriteString('<h5>Request HTTP cookies</h5>'); 260 for I := 0 to Request.Cookies.Count - 1 do begin; 261 WriteString(Request.Cookies.Strings[I] + '<br/>'); 262 end; 263 264 WriteString('<h5>Session variables</h5>'); 265 for I := 0 to HTTPServer.SessionHandler.Variables.Count - 1 do begin; 266 WriteString(HTTPServer.SessionHandler.Variables.Strings[I] + '<br/>'); 253 267 end; 254 268 … … 310 324 begin 311 325 inherited Create; 326 HTTPSessionFile := THTTPSessionFile.Create; 327 with HTTPSessionFile do begin 328 end; 312 329 HTTPServer := THTTPServer.Create; 313 330 with HTTPServer, Socket do begin 331 SessionHandler := HTTPSessionFile; 314 332 DocumentRoot := 'Data'; 315 333 with RequestHandlerList do begin … … 329 347 begin 330 348 HTTPServer.Destroy; 349 HTTPSessionFile.Destroy; 331 350 inherited Destroy; 332 351 end;
Note:
See TracChangeset
for help on using the changeset viewer.