[Zope-dev] virtual hosting variables [was: Re: Zope 2.7.0 b3 regressions]

2003-12-03 Thread Yuppie
Evan Simpson wrote:
Lennart Regebro wrote:

I will check this into head this evening, and unless people scream 
tomorrow
I will check it into the 2.7 branch.


Please hold off.  I've been meaning to revisit this for a while, and I 
have a bit of time to do so today and tomorrow.  Also, virtual hosting 
is properly the domain of the request object, not the object being 
traversed.  This is why the modified absolute_url() uses 
REQUEST.physicalPathToURL.

BTW:

I'm missing a REQUEST variable that represents the URL requested by the 
browser.

'PATH_INFO' doesn't show the virtual URL:
'/VirtualHostBase/http/example.org:80/VirtualHostRoot/_vh_test/path/to/object'
'URL' might be changed by __before_publishing_traverse__ or 
__browser_default__:
'http://example.org/test/path/to/object/index_html/view'

So I think it would be great if VHM would add a variable like 
'REQUESTED_URL' (should have a better name) that isn't further modified 
on traversal.
'http://example.org/test/path/to/object'

Just my 2 cents.

Cheers,
Yuppie


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] virtual hosting variables [was: Re: Zope 2.7.0 b3 regressions]

2003-12-03 Thread Casey Duncan
On Wed, 03 Dec 2003 20:43:23 +0100
Yuppie [EMAIL PROTECTED] wrote:

[snip]
 
 So I think it would be great if VHM would add a variable like 
 'REQUESTED_URL' (should have a better name) that isn't further modified 
 on traversal.
 'http://example.org/test/path/to/object'

+1

I actually had a case recently where using traverse_subpath in a python script screwed 
up CookieCrumbler (which uses REQUEST.URL to determine where it should redirect). 
Basically it ate the end of the URL value so the login form redirected to the wrong 
place.

The evil hack fix was actually a REQUEST.set('URL', ...), in the python script before 
any unauthorized errors could be raised. Perhaps it should be called ACTUAL_URL or 
ORIGINAL_URL. This would be the thing that CookieCrumber would redirect to...

-Casey

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )