Re: Using premade server responses

Rasmus Andersson <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
On Wed, Mar 18, 2009 at 02:43, Eddie Carle <[email protected]> wrote:
> Is there a way to get the web server to output one of it's canned responses?
> I've tried sending a "Status: 500 Internal Server Error" and it half works.
> The client gets the header, and knows there is an internal server error, but
> no textual data is actually outputted to the client. Like what if I want to
> output a 404 Not Found error message that the server canned. Is that
> possible?

You'll have to create the response yourself. The only thing most host
server do is set the correct status title (i.e. if you set "Status:
200" the host server should convert that header to "Status: 200 OK").

When sending non-200 responses you should know the HTTP protocol –
when and what to send is very important for the greater model.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

However, sending "canned responses" is something the host server can
do much much better than a custom FastCGI app (you have stuff like
mod_rewrite and cache metadta language in lighttpd which both can be
used to do alot of things).

> --
>
> Eddie Carle
>
> This message has been signed with an RFC4880 signature. It is guaranteed to
> have originated from Eddie Carle and its contents can be validated against
> its signature.
>
> _______________________________________________
> FastCGI-developers mailing list
> FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
> http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
>
>



-- 
Rasmus Andersson
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.