如何在 Openacs 中添加 HTTP 标头字段?
我需要在我网站的某个部分的响应中添加一个 HTTP 标头字段,正在 IFRAME 中查看包实例(我的部分),我想声明一个 p3p 字段以便能够在 IE 6 中存储 cockies /7/8(登录效果不好),我知道如何在 PHP 中做到这一点并且非常简单:
<?php
header('P3P: CP="CAO PSA OUR"');
?>
但我没有找到如何在 TCL/openacs 中做到这一点,感谢您的帮助。
I need to add a HTTP header field in the responses of a section of my site, the package instace (my section) is being viewed in a IFRAME and I want to declare a p3p field in order to be able to store cockies in IE 6/7/8 (login doesn't work well), I have an idea of how to do it in PHP and is quite simple:
<?php
header('P3P: CP="CAO PSA OUR"');
?>
but I didn't found how to do it in TCL/openacs, thanks for the help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据Jim Lynch的回复当您在其他地方问这个问题时,您只需添加它是为页面生成的标题集。
我猜想这样的事情可能是最简单的(假设您不想对标头的内容进行硬编码;如果您这样做,您可以简化一点):
要理解它,您需要阅读
ns_conn
和ns_set
来自 AOLserver 文档,以及set
来自标准 Tcl 文档。Based on Jim Lynch's response when you asked this question elsewhere, you just need to add it to the set of headers being produced for the page.
I'd guess that something like this is probably easiest (assuming you don't want to hard-code the contents of the header; if you did, you could simplify a little):
To understand it, you need to read about
ns_conn
andns_set
from the AOLserver docs, as well asset
from the standard Tcl documentation.