Hi,
Le Sat, 16 Nov 2013 07:14:54 +0100,
Tamer Higazi <[email protected]> a écrit:
> Any ideas how to get the http headers of a request object ?!
>
> I thought the Browser which send the headers to the server are stored
> in:
>
> self.request.headers which return me only a:
> <zope.publisher.http.HeaderGetter object at 0x26d97d0>
>
> for any advises I would thank you.
Did you try :
request.getHeader('Accept-Language') ?
or
request.headers.get('Accept-Language') ?
or
request.headers['Accept-Language'] ?
The last one may raise an exception if given header is not available,
while other ones will only return None (by default).
As far as I know, you can't get an enumeration of all headers which are
available in the HTTP request, you have to know which headers you are
looking for...
Regards,
Thierry
_______________________________________________
bluebream mailing list
[email protected]
https://mail.zope.org/mailman/listinfo/bluebream