HEAD of Acquired template within Archetypes.BaseFolder

Myroslav Opyr <[email protected]>
Newsgroups gmane.comp.web.zope.plone.archetypes.devel
Message-ID <[email protected]>
Hello,

It look like there is a bug in Archetypes for some time already. It is described
in http://plone.org/collector/4981.

If you issue HEAD HTTP request to template that is Acquired from outside of
BaseFolder-based object, you get NotFound. GET request is ok then.

It should be BaseObject.__bobo_traverse__ as following patch:
--- CUT ----------------------------------------------------------------
--- BaseObject.py.orig  2005-12-01 07:44:11.000000000 -0600
+++ BaseObject.py       2005-12-01 07:45:39.000000000 -0600
@@ -926,7 +926,7 @@
         # logic from "ZPublisher.BaseRequest.BaseRequest.traverse"
         # to check whether this is a browser request
         if (len(REQUEST.get('TraversalRequestNameStack', ())) == 0 and
-            not (method in ('GET', 'POST') and not
+            not (method in ('GET', 'HEAD' ,'POST') and not
                  isinstance(RESPONSE, xmlrpc.Response))):
             if shasattr(self, name):
                 target = getattr(self, name)
--- CUT ----------------------------------------------------------------
solves the issue.

Regards,

m.
--
http://quintagroup.com/ * Quintessence of modern business



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.