Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-08

Question about fcl-web Request's Handled variable

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo M. Ramé

As I'm looking for a way to handle Cookies in an automatic/global way, instead of checking for cookie existence in every action request, I was looking into TFPWebModule.onRequest method.

If I don't set Handled := True in that method, will the request continue to the Action Request handler?. If yes, I could inherit all my webmodules from a common ancestor, with it's onRequest method containing Cookie handling code.

Regards,

Reply by email

leledumbo
to Leonardo M. Ramé

I don't know about the Handled parameter, but I handle cookies exactly like what you did through a common ancestor. But the cookies handling is done at OnBeforeRequest, with descendants link their OnBeforeRequest to it. So descendants code are still clean from this.

Reply by email

Unknown author
to Leonardo M. Ramé: As I'm looking for a way to handle Cookies in an automatic/global way, instead of…
Leonardo M. Ram? wrote 8 lines
As I'm looking for a way to handle Cookies in an automatic/global way, instead of checking for cookie existence in every action request, I was looking into TFPWebModule.onRequest method. If I don't set Handled := True in that method, will the request continue to the Action Request handler?. If yes, I could inherit all my webmodules from a common ancestor, with it's onRequest method containing Cookie handling code.

That is the idea of having the handled param.

Michael.

Reply by email

Leonardo M. Ramé
to Unknown author
Show quoted text 15 lines
On Wed, 22 Aug 2012, Leonardo M. Ram? wrote: >As I'm looking for a way to handle Cookies in an automatic/global way, >instead of checking for cookie existence in every action request, I was >looking into TFPWebModule.onRequest method. > >If I don't set Handled := True in that method, will the request continue >to the Action Request handler?. If yes, I could inherit all my >webmodules from a common ancestor, with it's onRequest method containing >Cookie handling code. That is the idea of having the handled param.

Great!, you guys have thought about every single problem a programmer could face, I'm amazed.

Regards,

Reply by email

Unknown author
to Leonardo M. Ramé
Leonardo M. Ram? wrote 19 lines
On 2012-08-23 10:17:57 +0200, wrote: > > > On Wed, 22 Aug 2012, Leonardo M. Ram? wrote: > >> As I'm looking for a way to handle Cookies in an automatic/global way, >> instead of checking for cookie existence in every action request, I was >> looking into TFPWebModule.onRequest method. >> >> If I don't set Handled := True in that method, will the request continue >> to the Action Request handler?. If yes, I could inherit all my >> webmodules from a common ancestor, with it's onRequest method containing >> Cookie handling code. > > That is the idea of having the handled param. > Great!, you guys have thought about every single problem a programmer could face, I'm amazed.

The secret is simple:

We are programmers ourselves, and we use fcl-web ourselves :)

Michael.

Reply by email