Re: FastCGI protocol and http headers
Jose Adriano Baltieri <jabaltie-a/[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Organization | UNIMEP |
| Message-ID | <[email protected]> |
jancha wrote: Hiello. And where is the problem? You're right, I guess there is no problem. I just thought that there could be a special record type for doing that. It would be more organized, I think. Anyway, it works. There's a negotiation or a balance of which headers you put and which headers the http servers will add or strip out but, anyway, it works. Thanks ! 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/ -- Obrigado, ------------------------------------------------------------------------------ Jose Adriano Baltieri - Analista de Sistemas DTI - CENTRO - UNIMEP - Universidade Metodista de Piracicaba PIRACICABA - SP - Brasil - Fone : (19) 3124-1858 ------------------------------------------------------------------------------ ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/