Ignore:
Timestamp:
Mar 18, 2022, 1:32:32 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Build with Lazarus 2.2.0.
  • Modified: Code cleanup.
File:
1 edited

Legend:

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

    r100 r130  
    2727
    2828procedure Register;
     29
    2930
    3031implementation
     
    7172                Request.Query.Clear;
    7273              end;
     74              // Clean empty path parts
     75              for I := Request.Path.Count - 1 downto 0 do
     76                if Request.Path[I] = '' then Request.Path.Delete(I);
    7377            end;
    7478          end else begin
     
    103107    Response.Content.Clear;
    104108    Response.Headers.Add('Content-Type', 'text/html');
    105 
    106 
    107109
    108110    if Assigned(OnRequest) then OnRequest(HandlerData)
     
    153155destructor THTTPServerTCP.Destroy;
    154156begin
    155   Socket.Free;
    156   RequestHandlerList.Free;
    157   inherited Destroy;
     157  FreeAndNil(Socket);
     158  FreeAndNil(RequestHandlerList);
     159  inherited;
    158160end;
    159161
Note: See TracChangeset for help on using the changeset viewer.