[fpc-devel] Customize TRequest and TResponse

Joao Morais jcmoraisjr at gmail.com
Sun Feb 5 21:41:12 CET 2012

On Sun, Feb 5, 2012 at 18:11, Michael Van Canneyt
<michael at freepascal.org> wrote:
> On Sun, 5 Feb 2012, Joao Morais wrote:
>> Hello fpc-devel list.
>> I need to implement some customizations to the request and response
>> classes of the fastcgi implementation -- maybe others as well -- but
>> afaics I cannot override such classes without copy/paste the whole
>> FCGI.ProcessRecord method.
>> A draft of the implementation I'd like to see in the fcl-web is
>> described below. Is it possible to implement? Perhaps 2.6 branch?
> It is possible to implement this, and I even have started the process.
> However, I don't see the use of adding the abstract calls?
> Implementing this in src/base/custweb.pp gives the impression that you can
> use any TRequest/TResponse descendent, which definitely is not the case.
> for instance in src/base/custfcgi.pp I would add
>    function CreateRequest: TFCGIRequest; virtual;
>    function CreateResponse(ARequest: TFCGIRequest): TFCGIResponse; virtual;
> And similar functions in the other webhandler components.


The idea behind my draft was just a guideline to use the same method
name and params. It's not a good one since the entries in the base
class won't be used.

> I started on this procedure already.
> I just need to complete the work.
> If you want, you can of course provide a patch that completes the work.

Nice, attached for fcgi against rev 20265, 2.6 branch, packages/fcl-web/ dir.

Joao Morais
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fcl-web.patch.zip
Type: application/zip
Size: 811 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20120205/9d364feb/attachment.zip>

More information about the fpc-devel mailing list