Hi Michal,

This code

> $this->getResponse()->removeHttpHeader('Pragma');

does not remove the Pragma Header since this header is set by php  
itself (most probably by session_start() in your case) and thus is not  
managed by agavi.

This code

> $this->getResponse()->setHttpHeader('Pragma', '');

Overwrites the header set by php with an empty value. It should not  
have any side effects. You can use curl or any other low level http  
lib to check whether the header is really removed.

felix

On Oct 19, 2009, at 2:57 PM, Michal Charemza wrote:

> Hi,
>
> I'm trying to make sure that certain views *are* cached (in the
> browser / proxies), so I'm setting the cache-control, expires headers
> appropriately. I'm also trying to prevent the "Pragma" http header
> from being sent. In a view the following does not seem to have an
> effect:
>
> $this->getResponse()->removeHttpHeader('Pragma');
>
> However the following does seem to remove the header (according to
> Firebug)
>
> $this->getResponse()->setHttpHeader('Pragma', '');
>
> Can I check that doing the latter is ok, and will suffer not bad
> consequences?
>
> Michal.
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.agavi.org/mailman/listinfo/users
>

--
Felix Gilcher

Bitextender GmbH
Paul-Heyse-Str. 6
D-80336 München

T: +49 89 57 08 15 16
F: +49 89 57 08 15 17
M: +49 172 840 88 28

[email protected]
http://www.bitextender.com/

Amtsgericht München, HRB 174280
Geschäftsführer: David Zülke, Florian Clever


_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to