Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fano web application used Free Pascal 3.0.4 TFpHttpServer returns empty response with incorrect Content-Type #28

Closed
zamronypj opened this issue Nov 24, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@zamronypj
Copy link
Member

Fano web application that use Free Pascal 3.0.4 TFpHttpServer returns empty response with incorrect Content-Type when compiled with FPC 3.0.4

How to reproduce

  • Install FPC 3.0.4
  • Create http project with latest Fano CLI
$ fanocli --project-http=myproject
$ cd myproject && fanocli --controller=Home --route=/ 
$ ./build.sh
$ ./bin/app.cgi
  • It will run http application in port 20477
  • Open http://127.0.0.1:20477 in browser. Browser downloads response.
@zamronypj zamronypj self-assigned this Nov 24, 2022
@zamronypj zamronypj added the bug Something isn't working label Nov 24, 2022
@zamronypj
Copy link
Member Author

Fixed in 076846e

@zamronypj
Copy link
Member Author

This issue is caused by different behavior of FileExists() in FPC 3.0.4 and FPC 3.2.0. Prior to FPC 3.2.0, In Unix/Linux, FileExists() returns true for both for existing file and directory. In FPC 3.2.0, FileExists() returns false if input name is existing directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant