Re: FastCGI protocol and http headers

jancha <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
Hiello.

And where is the problem?

Typically what you send back to client is:

===========
header1
header2
....
...
[blank new line]
and the data
===========

So, to send e.g. 403 status, form your answer as simple as:

===========
Status: 403
===========

or

===========
Content-Type: text/html
[blank new line]
<html>
...

...
===========

hmm...

On Wednesday 26 July 2006 17:26, Jose Adriano Baltieri wrote:
>  I'm writing my own FastCGI server and because of that, I'm going deep on
> the protocol specs. The server is already OK. It communicates and processes
> transactions normally. However, I'm now needing more sophisticated
> things...
>
>  The FastCGI specification does not seem to offer a special handling for
> the http headers. Sometimes the application may need to set up special http
> headers or at least to have more control over them and, I'd like how is the
> official approach for doing that.
>
>  Should I send the http headers via a special record type ? Guess not.
> There is no such a record type. Should I send it as part of the FCGI_STDOUT
> record ? If so, how the http server is supposed to parse it ? What's the
> rule ? Hope the answer is "there is no rule" !
>
>  Follow some situations where we may need special http headers :
>
> The application (script) wants to issue a HTTP 302 status (redirection)
> The application wants a special content-type setting
> The application needs to stuff a customized Pragma http header
>  Thanks in advance 4 your support !

-------------------------------------------------------
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.