[ZCM] [ZC] 2077/ 3 Comment "problem with ACTUAL_URL and SiteRoot"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Wed May 3 21:58:02 EDT 2006


Issue #2077 Update (Comment) "problem with ACTUAL_URL and SiteRoot"
 Status Pending, Zope/bug+solution medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/2077

==============================================================
= Comment - Entry #3 by ajung on May 3, 2006 9:57 pm

Please ensure that your patch also includes a unittest.
________________________________________
= Comment - Entry #2 by ajl on May 3, 2006 5:37 pm


Uploaded:  "siteroot-actual_url.patch"
 - http://www.zope.org/Collectors/Zope/2077/siteroot-actual_url.patch/view
ack, hit submit too soon.  here is the actual patch.
________________________________________
= Request - Entry #1 by ajl on May 3, 2006 5:21 pm

When a SiteRoot is installed in a folder, most of the URL headers in the request are rewritten using the SiteRoot's address.  ACTUAL_URL, however, is not.  This will break most code using ACTUAL_URL.  For example, if ACTUAL_URL is used in generating link URLs for pages, and the zope server address, before the SiteRoot address is substituted, is not (and should not be) externally accessible, the resulting links will be broken.

The attached patch resolves this problem.  It modifies SiteRoot.py to substitute in the SiteRoot URL into ACTUAL_URL.
==============================================================



More information about the Zope-Collector-Monitor mailing list