help-cgicc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: cgicc + FastCGI, patch


From: Stephen F. Booth
Subject: RE: cgicc + FastCGI, patch
Date: Thu, 18 Oct 2001 18:39:44 -0400

I haven't had a chance to look at your patch yet, but I actually did make
changes to cgicc to make it compatible with FastCGI.  But, I updated the
website before releasing the next version.  So, unless you're using the CVS
version of cgicc, the FastCGI changes aren't in there.  Basically what I did
was add a new constructor for the Cgicc class that takes a reader_function_t
to use for writing the output.  I've typedef'd reader_function_t to

//! A stream-reader function, for FastCGI compatibility
typedef size_t (* reader_function_t)(void *, size_t);

in CgiEnvironment.h

I'll look at your patch and see if you did things similarly or better.  In
any case, sorry for the confusion.  I updated the website quite a while ago,
then started doing massive changes to the library and never 'undid' the
changes to the website when I didn't release the new version.

-Stephen

> The cgicc website says, cgicc was compatible with FastCGI. This is not
> really true.
>
> You could modify the cgicc source files to #include FastCGI's CGI
> compatibility library "fcgi_stdio.h". Then cgicc could actually work with
> FastCGI (haven't tried it). "fcgi_stdio.h" contains #define's for things
> like "stdin", "fopen" and "fprintf".
>
> However, you wouldn't want to use the compatibility library for C++
> programs, because you would have to do C style I/O. It would also make
> cgicc's HTML generation facilities useless. You'd rather want to use
> "fcgiapp.h" and "fcgio.h", which implements C++ streams on top of the
> FastCGI streams. So you can do normal C++ I/O, using the "<<" and ">>"
> operators.
>
> I've patched cgicc to really be compatible with FastCGI. The patch is
> attached. It makes some (compatible) modifications to the Cgicc and
> CgiEnvironment classes, and introduces the new subclasses Fcgicc and
> FcgiEnvironment to be used instead, in FastCGI programs.
>
> Use "patch -p0 < cgicc-fastcgi-patch" in the cgicc-3.1.5 directory to
> apply the patch.
>
> The patch remains yet to be integrated into to configuration script.
> Something like "--with-fastcgi" should be added. (Don't know how to do
> this). I could also provide a skeleton program for documentation on how to
> use FastCGi and cgicc together, if the maintainer wants to include the
> patch in the cgicc distribution.
>
> Yours,
> Volker Wysk
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]