Hi Nathan,

> is_view_template is not working correctly because the VIRTUAL_URL is not
> getting set correctly in repoze.vhm. Basically, repoze.zope2 uses the
> environ value of "repoze.vhm.virtual_url" to generate the VIRTUAL_URL.
> Then the actual url is grabbed from that VIRTUAL_URL.
>
> As far as I can understand, in repoze.vhm.middleware.munge, the lines,
>
>              real_path = environ['PATH_INFO'].split('/')
>
>              if vroot_path:
>
>                  virtual_url_parts += real_path[len(vroot_path):]
>
>              else:
>
>                  virtual_url_parts += real_path[1:]
>
>
> should simply be,
>
>              real_path = environ['PATH_INFO'].split('/')
>
>              virtual_url_parts += real_path[1:]

I doubt that. I think I added the 'if vroot_path' bit to fix a similar 
bug, if not the same bug, when using vhm_path. You'll need to svn blame 
it and look at what tests were added at the same time, though.

> I'm probably missing something obvious though. If this is actually an
> issue that isn't specific to my setup, I find it difficult that no one
> else has noticed it prior.

I suspect most people will have used vhm_path instead of vhm_xheaders.

Or it could've been a regression I introduced when fixing this issue 
(and other issues) for the vhm_path use case. :)

Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book

_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to