[Catalog-sig] Re: Dr. Dobb's Python-URL! - weekly Python news and links (Nov 11)

Greg Stein gstein@lyra.org
Tue, 12 Nov 2002 17:50:13 -0800


On Tue, Nov 12, 2002 at 01:41:38PM +0100, Thomas Heller wrote:
>...
> I have a re-implementation of PEP 243 without using non-standard HTTP headers,
> you can find a description in one of the recent posts to catalog-sig.

Ah. Good. It would be nice if information about that got back into the PEP.

To be honest, I'm not going to jump right in and start using the code or
anything like that. I'm just making a little contribution here based on my
experience with and knowledge of HTTP.

> Actually without using any HTTP headers at all in the client code...
> 
> How would you set standard HTTP headers in a CGI script?
> Or does the server only add them if they are not found in the
> CGI output?

The server will set any of standard headers which are appropriate (possibly
overriding any the CGI sets), but some web servers will provide a way to
avoid adding any header. In Apache, if the script starts with "nph-" or
somesuch, then Apache will just stream the CGI output right into the socket.
The CGI is then responsible for getting everything right.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/