Commit 443acccd authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

enable 'public' and '304s' for anonymous access in caching_policy_manager.

parent 414ad054
...@@ -27,10 +27,7 @@ ...@@ -27,10 +27,7 @@
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <global name="PersistentMapping" module="Persistence.mapping"/>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -103,12 +100,20 @@ ...@@ -103,12 +100,20 @@
<tuple/> <tuple/>
<state> <state>
<dictionary> <dictionary>
<item>
<key> <string>_enable_304s</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>_etag_func</string> </key> <key> <string>_etag_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>_last_modified</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>_max_age_secs</string> </key> <key> <string>_max_age_secs</string> </key>
<value> <int>3600</int> </value> <value> <int>3600</int> </value>
...@@ -131,16 +136,50 @@ ...@@ -131,16 +136,50 @@
<key> <string>_no_store</string> </key> <key> <string>_no_store</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>_no_transform</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>_policy_id</string> </key> <key> <string>_policy_id</string> </key>
<value> <string>unauthenticated</string> </value> <value> <string>unauthenticated</string> </value>
</item> </item>
<item>
<key> <string>_post_check</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_pre_check</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_predicate</string> </key> <key> <string>_predicate</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAg=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAg=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>_private</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_proxy_revalidate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_public</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>_s_max_age_secs</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_vary</string> </key> <key> <string>_vary</string> </key>
<value> <string>Accept-Language, Cookie</string> </value> <value> <string>Accept-Language, Cookie</string> </value>
...@@ -158,12 +197,20 @@ ...@@ -158,12 +197,20 @@
<tuple/> <tuple/>
<state> <state>
<dictionary> <dictionary>
<item>
<key> <string>_enable_304s</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>_etag_func</string> </key> <key> <string>_etag_func</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAk=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAk=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>_last_modified</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>_max_age_secs</string> </key> <key> <string>_max_age_secs</string> </key>
<value> <int>300</int> </value> <value> <int>300</int> </value>
...@@ -186,16 +233,50 @@ ...@@ -186,16 +233,50 @@
<key> <string>_no_store</string> </key> <key> <string>_no_store</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>_no_transform</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>_policy_id</string> </key> <key> <string>_policy_id</string> </key>
<value> <string>unauthenticated web pages</string> </value> <value> <string>unauthenticated web pages</string> </value>
</item> </item>
<item>
<key> <string>_post_check</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_pre_check</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_predicate</string> </key> <key> <string>_predicate</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAs=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAs=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>_private</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_proxy_revalidate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>_public</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>_s_max_age_secs</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_vary</string> </key> <key> <string>_vary</string> </key>
<value> <string>Accept-Language, Cookie</string> </value> <value> <string>Accept-Language, Cookie</string> </value>
...@@ -261,10 +342,7 @@ ...@@ -261,10 +342,7 @@
</record> </record>
<record id="6" aka="AAAAAAAAAAY="> <record id="6" aka="AAAAAAAAAAY=">
<pickle> <pickle>
<tuple> <global name="Expression" module="Products.CMFCore.Expression"/>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -277,10 +355,7 @@ ...@@ -277,10 +355,7 @@
</record> </record>
<record id="7" aka="AAAAAAAAAAc="> <record id="7" aka="AAAAAAAAAAc=">
<pickle> <pickle>
<tuple> <global name="Expression" module="Products.CMFCore.Expression"/>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -293,10 +368,7 @@ ...@@ -293,10 +368,7 @@
</record> </record>
<record id="8" aka="AAAAAAAAAAg="> <record id="8" aka="AAAAAAAAAAg=">
<pickle> <pickle>
<tuple> <global name="Expression" module="Products.CMFCore.Expression"/>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -309,10 +381,7 @@ ...@@ -309,10 +381,7 @@
</record> </record>
<record id="9" aka="AAAAAAAAAAk="> <record id="9" aka="AAAAAAAAAAk=">
<pickle> <pickle>
<tuple> <global name="Expression" module="Products.CMFCore.Expression"/>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -325,10 +394,7 @@ ...@@ -325,10 +394,7 @@
</record> </record>
<record id="10" aka="AAAAAAAAAAo="> <record id="10" aka="AAAAAAAAAAo=">
<pickle> <pickle>
<tuple> <global name="Expression" module="Products.CMFCore.Expression"/>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -341,10 +407,7 @@ ...@@ -341,10 +407,7 @@
</record> </record>
<record id="11" aka="AAAAAAAAAAs="> <record id="11" aka="AAAAAAAAAAs=">
<pickle> <pickle>
<tuple> <global name="Expression" module="Products.CMFCore.Expression"/>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
......
1103 1104
\ No newline at end of file \ No newline at end of file
...@@ -474,7 +474,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -474,7 +474,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
if policy[0] == 'unauthenticated'][0] if policy[0] == 'unauthenticated'][0]
self.assertEquals(response.getHeader('Content-Type'), 'image/png') self.assertEquals(response.getHeader('Content-Type'), 'image/png')
self.assertEquals(response.getHeader('Cache-Control'), self.assertEquals(response.getHeader('Cache-Control'),
'max-age=%s' % policy[1].getMaxAgeSecs()) 'max-age=%s, public' % policy[1].getMaxAgeSecs())
def test_07_TestDocumentViewBehaviour(self): def test_07_TestDocumentViewBehaviour(self):
"""All Documents shared the same downloading behaviour """All Documents shared the same downloading behaviour
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment