You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Sreenath BH <bh...@gmail.com> on 2016/01/07 13:29:55 UTC

[users@httpd] cfgid module - setting HTTP status header

Hi,

We have written some C fastcgi programs and we are using apache fcgid module.
When we encounter an error in the script, we want the end user
(client) to see HTTP status of 401/403, etc.

However, even if we set Status header to any of the above values, HTTP
status is returned to the client as 200.

I read that fastcgi module will work correctly if Status header is set
by the program. Is the behavior of fcgid different?

Is there any way we can send such status code in fcgid?

thanks,
Sreenath

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] cfgid module - setting HTTP status header

Posted by Sreenath BH <bh...@gmail.com>.
Hi

There was an extra '\n' at beginning of Status as follows:

'\nStatus: 400'

After removing the extra character it worked.

Thanks,
Sreenath


On 1/7/16, Nick Kew <ni...@webthing.com> wrote:
> On Thu, 7 Jan 2016 17:59:55 +0530
> Sreenath BH <bh...@gmail.com> wrote:
>
>> Is there any way we can send such status code in fcgid?
>
> Have you tried it with a trivial test script?
> Maybe just set the status and reply HelloWorld?
>
> --
> Nick Kew
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] cfgid module - setting HTTP status header

Posted by Nick Kew <ni...@webthing.com>.
On Thu, 7 Jan 2016 17:59:55 +0530
Sreenath BH <bh...@gmail.com> wrote:

> Is there any way we can send such status code in fcgid?

Have you tried it with a trivial test script?
Maybe just set the status and reply HelloWorld?

-- 
Nick Kew


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] cfgid module - setting HTTP status header

Posted by IdealGourmet <in...@idealgourmet.es>.
You make an error don't send more e-mail here please

-----Mensaje original-----
De: Sreenath BH [mailto:bhsreenath@gmail.com] 
Enviado el: jeudi 7 janvier 2016 13:30
Para: users@httpd.apache.org
Asunto: [users@httpd] cfgid module - setting HTTP status header

Hi,

We have written some C fastcgi programs and we are using apache fcgid module.
When we encounter an error in the script, we want the end user
(client) to see HTTP status of 401/403, etc.

However, even if we set Status header to any of the above values, HTTP status is returned to the client as 200.

I read that fastcgi module will work correctly if Status header is set by the program. Is the behavior of fcgid different?

Is there any way we can send such status code in fcgid?

thanks,
Sreenath

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org