-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nathan Van Gheem wrote:
> Seems like Hanno was on the right track here.
> 
> 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:]

If you have a virtual root, then you *don't* want it to appear in
generated URLs:  it shows up in the URLs bewteen Apache and your app,
but not to outside users.

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

Can you outline your setup?

- - What is the server configured to pass as X-VHM-Root and X-VHM-Host?

- - Does the server set SERVER_NAME?

- - What sub-path, if any, are you serving as the virtual root?



- --
===================================================================
Tres Seaver          +1 540-429-0999          tsea...@palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAks5LOIACgkQ+gerLs4ltQ6aeQCeKJTH6PkymiZkGaxmzOQ4ijEz
AEEAn1ohmOKBtlGdAsZjgtDwCWI5kHGM
=aa/b
-----END PGP SIGNATURE-----
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to