[Lazarus] Simple embweb project hangs

Leonardo M. Ramé l.rame at griensu.com
Mon Jun 6 01:42:36 CEST 2011


On 2011-06-06 00:09:11 +0200, Artur Stuczynski wrote:
> W dniu 2011-05-29 21:01, Leonardo M. Ramé pisze:
> >On 2011-05-29 11:56:46 -0700, ABorka wrote:
> >>It will not fix your crash, but you are missing
> >>
> >>Handled:=True;
> >>
> >>from your action handler.
> >>
> >>AB
> >
> >Thanks. As you said, it doesn't fix the problem, a hang, not a crash.
> 
> I can (sort of) confirm this behavior. Steps to reproduce:
> 
> 1. Select new 'Web application' from Lazarus menu
> 2. Add new action to WebModule, make it default
> 3. In OnRequest event put:
> 
>    AResponse.Content := 'Whatever';
>    Handled := True;
> 
> 4. Launch it within Lazarus
> 5. Point your browser to: http://localhost:7004/webproject1
> 
> I observe series of EResNotFound messages from the application, the browser
> seems to be waiting for a reponse until 500 error is displayed ultimately.
> 
> HOWEVER
> 
> Launch the webproject1 from command line and everything just works. At first
> sight it looks like incorrect integration of Embweb with Lazarus?
> 
> Tested on Debian x86_64, Lazarus 0.9.31 and FPC 2.5.1 from trunk updated two
> or three days ago.
> 
> Artur

Hi Artur, please try adding LResources to your main project (.lpr) file.

Apart from this, I would like to ask you to take a look at the new
httpserver that Michael added to fcl-web in the trunk svn revision of
fpc. There's an example for Lazarus in /packages/fcl-web/examples/httpapp.

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com




More information about the Lazarus mailing list