* Merging revisions r42871,r42872 from trunk:

------------------------------------------------------------------------
    r42871 | michael | 2019-08-29 21:02:08 +0200 (Thu, 29 Aug 2019) | 1 line
    
    * Fix forgotten loadmimetypes
    ------------------------------------------------------------------------
    r42872 | michael | 2019-08-29 21:07:52 +0200 (Thu, 29 Aug 2019) | 1 line
    
    * Observe -m
    ------------------------------------------------------------------------

git-svn-id: branches/fixes_3_2@42873 -
This commit is contained in:
michael 2019-08-29 19:08:45 +00:00
parent 7e962b39e2
commit 810989c765

View File

@ -71,10 +71,12 @@ begin
MimeTypesFile:=GetOptionValue('m','mimetypes');
if (MimeTypesFile<>'') and not FileExists(MimeTypesFile) then
begin
MimeTypesFile:='';
Log(etWarning,'mimetypes file not found: '+MimeTypesFile);
MimeTypesFile:='';
end;
end;
If MimeTypesFile<>'' then
MimeTypes.LoadFromFile(MimeTypesFile);
end;
procedure THTTPApplication.DoRun;
@ -88,6 +90,7 @@ begin
usage(S);
Quiet:=HasOption('q','quiet');
Port:=StrToIntDef(GetOptionValue('p','port'),3000);
LoadMimeTypes;
D:=GetOptionValue('d','directory');
if D='' then
D:=GetCurrentDir;