I created a simple HTTP Server Application (source code attached), but it just won't work.
When I put the link localhost:8080 into web browser, I get the following error:
httpproject1: ERROR
The application encountered the following error:
Error: Not found
Stack trace:
$00000000004A36EB
$00000000004A2D4F
...
The only thing I did is:
- created a new Project/HTTP server Application and added DataModuleRequest procedure:
procedure TFPWebModule1.DataModuleRequest(Sender: TObject; ARequest: TRequest;
AResponse: TResponse; var Handled: Boolean);
begin
// AResponse.ContentType := 'text/plain';
AResponse.Content := 'Greetings from Lazarus HTTP Server Application!';
Handled := True;
end;
Same problem is on Debian 64bit + FPC 3.1.1 + Lazarus Trunk and on Windows 10 64bit + FPC 3.0.4 + Lazarus 1.8.2.
I read "Basic fpWeb Tutorial" by Leledumbo, but I don't find anything wrong with the code.
Can anyone point me to the right direction?