Recent

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

dogriz

  • Full Member
  • ***
  • Posts: 126
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.2.2
Lazarus 2.2.4
Debian x86_64, arm

heejit

  • Full Member
  • ***
  • Posts: 245

dogriz

  • Full Member
  • ***
  • Posts: 126
Re: WebLaz - HTTP Server Application Error
« Reply #2 on: June 02, 2018, 09:59:37 pm »
Yes, that's it. Thanks!
FPC 3.2.2
Lazarus 2.2.4
Debian x86_64, arm

Leledumbo

  • Hero Member
  • *****
  • Posts: 8747
  • 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

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

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
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 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018