List Info

Thread: cgicc: fastcgi question




cgicc: fastcgi question
country flaguser name
United States
2008-02-19 14:28:31
Good afternoon all,
I'm using cgicc to do fastcgi. I can't figure out how to set
the error
code
though. How does one return a 404 using fastcgi?

This looks like the right routine:
 
*-----------------------------------------------------------
-----------
 *
 * FCGX_SetExitStatus --
 *
 *      Sets the exit status for stream's request. The exit
status
 *      is the status code the request would have exited
with, had
 *      the request been run as a CGI program.  You can
call
 *      SetExitStatus several times during a request; the
last call
 *      before the request ends determines the value.
 *
 
*-----------------------------------------------------------
-----------
void FCGX_SetExitStatus(int status, FCGX_Stream *stream)
 ...

But it doesn't work. I tried all the three streams in the
request
structure:
FCGX_SetExitStatus( 404, request.out );

Any suggestions?


Re: cgicc: fastcgi question
country flaguser name
United States
2008-02-20 10:07:49
On Feb 19, 2:28 pm, Jay <JSpren...gmail.com> wrote:
>  I can't figure out how to set the error
> code
> though. How does one return a 404 using fastcgi?
>

Well, it appears the microsoft fastcgi plugin for IIS
doesn't support
writing to the appStatus field like the specs say. I did
find if you
write to
the stderror stream it returns as an error and sends the
text you
wrote.
This is sufficient for my application so I've figured out
enough to
get me
going.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )