* * *

Author Topic: WebLaz - HTTP Server Application Error  (Read 1172 times)

dogriz

  • Jr. Member
  • **
  • Posts: 94
    • Tech blog - Delphi, Lazarus, Firebird, Windows, Linux, Android...
WebLaz - HTTP Server Application Error
« on: June 02, 2018, 09:07:18 pm »
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:


Quote
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:

Code: [Select]
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?
FPC 3.0.3
Lazarus 1.6.5
Debian x86_64, arm

jshah

  • Full Member
  • ***
  • Posts: 119

dogriz

  • Jr. Member
  • **
  • Posts: 94
    • Tech blog - Delphi, Lazarus, Firebird, Windows, Linux, Android...
Re: WebLaz - HTTP Server Application Error
« Reply #2 on: June 02, 2018, 09:59:37 pm »
Yes, that's it. Thanks!
FPC 3.0.3
Lazarus 1.6.5
Debian x86_64, arm

Leledumbo

  • Hero Member
  • *****
  • Posts: 7971
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: WebLaz - HTTP Server Application Error
« Reply #3 on: June 02, 2018, 11:22:46 pm »
Maybe I should start updating that tutorial.

nummer8

  • New member
  • *
  • Posts: 41
Re: WebLaz - HTTP Server Application Error
« Reply #4 on: June 03, 2018, 12:13:49 pm »
and/ or we could update the examples.

dbannon

  • Sr. Member
  • ****
  • Posts: 328
Re: WebLaz - HTTP Server Application Error
« Reply #5 on: June 03, 2018, 02:56:49 pm »
Easiest thing might be to add a note about this on the wiki. Its where people download the tutorial from so most likely to see it there.

I'll do it tomorrow if no one beats me.

Davo
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus