Changeset 96 for trunk/Packages/CoolWeb/WebServer
- Timestamp:
- Oct 2, 2012, 9:22:02 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 5 5 backup 6 6 ZdechovNET.lps 7 heaptrclog.trc
-
- Property svn:ignore
-
trunk/Packages/CoolWeb/WebServer/UHTTPServer.pas
r84 r96 7 7 uses 8 8 Classes, SysUtils, UTCPServer, UCommon, UMemoryStreamEx, UMIMEType, 9 Synautil, SpecializedList, SpecializedDictionary ;9 Synautil, SpecializedList, SpecializedDictionary, Syncobjs; 10 10 11 11 type … … 102 102 procedure SetShowExceptions(const AValue: Boolean); 103 103 public 104 Lock: TCriticalSection; 104 105 procedure Run; virtual; 105 106 procedure ErrorResponse(HandlerData: THTTPHandlerData); … … 228 229 begin 229 230 inherited; 231 Lock := TCriticalSection.Create; 230 232 ShowExceptions := False; 231 233 DocumentRoot := './'; … … 234 236 destructor THTTPServer.Destroy; 235 237 begin 236 inherited Destroy; 238 FreeAndNil(Lock); 239 inherited; 237 240 end; 238 241 -
trunk/Packages/CoolWeb/WebServer/UHTTPServerTCP.pas
r84 r96 44 44 begin 45 45 with TTCPClientThread(Sender), Socket do begin 46 WriteLn(' Used thrads' + IntToStr(Parent.ThreadPool.UsedCount) + '. Client connected from ' + GetRemoteSinIP);46 WriteLn('Thread ' + IntToStr(Id) + ' from ' + IntToStr(Parent.ThreadPool.UsedCount) + '. Client connected from ' + GetRemoteSinIP); 47 47 48 48 HandlerData := THTTPHandlerData.Create; … … 58 58 repeat 59 59 Line := RecvString(10000); 60 WriteLn(IntToStr(Id) + ' ' + Line); 60 61 if (LineIndex = 0) then begin 61 62 LineParts.Explode(Line, ' ', StrToStr); … … 115 116 // Send headers 116 117 for I := 0 to Headers.Count - 1 do begin 117 WriteLn(Headers.Keys[I] + ': ' + Headers.Items[I].Value + #13#10);118 //WriteLn(Headers.Keys[I] + ': ' + Headers.Items[I].Value + #13#10); 118 119 SendString(Headers.Keys[I] + ': ' + Headers.Items[I].Value + #13#10); 119 120 end; -
trunk/Packages/CoolWeb/WebServer/UWebApp.pas
r91 r96 12 12 THTTPServerType = (stCGI, stTCP, stTurboPower); 13 13 14 { TRegistredPage } 15 14 16 TRegistredPage = class 15 17 Name: string; 16 18 Page: TWebPage; 19 destructor Destroy; override; 17 20 end; 18 21 … … 65 68 end; 66 69 70 { TRegistredPage } 71 72 destructor TRegistredPage.Destroy; 73 begin 74 if Assigned(Page) then FreeAndNil(Page); 75 end; 76 67 77 68 78 { TPageList }
Note:
See TracChangeset
for help on using the changeset viewer.