Re: HEAD of Acquired template within Archetypes.BaseFolder

"Alexander Limi" <limi-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.archetypes.devel
Organization Plone Solutions · http://www.plone solutions.com
Message-ID <[email protected]>
This is now committed to AT:

http://trac.plone.org/plone/ticket/4981

On Thu, 01 Dec 2005 05:57:14 -0800, Myroslav Opyr  
<[email protected]> wrote:

> 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



-- 
_____________________________________________________________________

      Alexander Limi · Chief Architect · Plone Solutions · Norway

  Consulting · Training · Development · http://www.plonesolutions.com
_____________________________________________________________________

       Plone Co-Founder · http://plone.org · Connecting Content
   Plone Foundation · http://plone.org/foundation · Protecting Plone



-------------------------------------------------------
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.