[Pas2js] compileserver bug

Michael Van Canneyt michael at freepascal.org
Sun Mar 18 19:17:10 CET 2018



On Sun, 18 Mar 2018, Tomislav Avramovic wrote:

> Can you add this to httpcompile.pp after line 494
>
> {$ifdef unix}
>   MimeTypesFile:='/etc/mime.types';
> // add
> {$else}
>   MimeTypesFile:=ExtractFilePath(System.ParamStr(0))+'mime.types';
> // end
> {$endif}
>
> On Win without mime.types file Chrome open SaveAs dialog when you open 
> html file because content-type is octet.
> Also add some notes for developers to add mime.types file with 
> compileserver.exe
> if
>   MimeTypesFile:='mime.types';
> then we must put mime.files file in every project dir.

Good suggestion. I have implemented this. Rev. 38566.

I want to change the fpMimeTypes unit so that on windows, it checks the
registry for mime types. I have code that does this, but I need a moment to
implement it in fpmimetypes.

Michael.


More information about the Pas2js mailing list