[Zope] Re: Accessing HTTP request headers

Maik Jablonski maik.jablonski@uni-bielefeld.de
Tue, 08 Apr 2003 18:22:35 +0200


Matt Ficken wrote:
> I need to know how to access the HTTP headers the client sent from within a product class that inherits from Folder. 

You can find all HTTP-Headers from the client in the REQUEST-Object, 
especially in the environ-attribut. Please check this with:

<dtml-var "REQUEST.environ">

But note: All HTTP-Headers from the client get a prefix from ZServer: HTTP_

So if the client sends the header:

ACCEPT_ENCODING

Zserver will translate this to:

HTTP_ACCEPT_ENCODING

So, there's no need to write your own Header-Parser...;)

Cheers, Maik