You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2006/02/02 15:12:56 UTC
svn commit: r374394 - in /lenya/trunk/src/webapp: global-sitemap.xmap
lenya/module-resources.xmap
Author: andreas
Date: Thu Feb 2 06:12:52 2006
New Revision: 374394
URL: http://svn.apache.org/viewcvs?rev=374394&view=rev
Log:
Mount module-resources.xmap with pass-through. This allows the module to serve resources if module-resources.xmap doesn't contain an appropriate pipeline. Added HTML and XHTML pipelines to module-resources.xmap. This fixes bug #38455, thanks to Simon Litwan for the patch.
Modified:
lenya/trunk/src/webapp/global-sitemap.xmap
lenya/trunk/src/webapp/lenya/module-resources.xmap
Modified: lenya/trunk/src/webapp/global-sitemap.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/global-sitemap.xmap?rev=374394&r1=374393&r2=374394&view=diff
==============================================================================
--- lenya/trunk/src/webapp/global-sitemap.xmap (original)
+++ lenya/trunk/src/webapp/global-sitemap.xmap Thu Feb 2 06:12:52 2006
@@ -266,19 +266,17 @@
<!-- Module requests -->
<map:match pattern="modules/*/**">
+
<map:select type="resource-exists">
-
<!-- resource exists - serve statically -->
<map:when test="lenya/modules/{1}/resources/{2}">
- <map:mount uri-prefix="modules/" src="lenya/module-resources.xmap" check-reload="true" reload-method="synchron"/>
+ <map:mount uri-prefix="modules/" src="lenya/module-resources.xmap" check-reload="true" reload-method="synchron" pass-through="true"/>
</map:when>
-
- <!-- resource doesn't exist - delegate to module -->
- <map:otherwise>
- <map:mount uri-prefix="modules/{1}/" src="lenya/modules/{1}/sitemap.xmap" check-reload="true" reload-method="synchron"/>
- </map:otherwise>
-
</map:select>
+
+ <!-- resource doesn't exist or not handled by lenya/module-resources.xmap - delegate to module -->
+ <map:mount uri-prefix="modules/{1}/" src="lenya/modules/{1}/sitemap.xmap" check-reload="true" reload-method="synchron"/>
+
</map:match>
</map:pipeline>
Modified: lenya/trunk/src/webapp/lenya/module-resources.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/module-resources.xmap?rev=374394&r1=374393&r2=374394&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/module-resources.xmap (original)
+++ lenya/trunk/src/webapp/lenya/module-resources.xmap Thu Feb 2 06:12:52 2006
@@ -43,6 +43,12 @@
<!-- matches modules/*/**.* -->
<map:match pattern="*/**.*">
+ <map:match type="regexp" pattern="(.*\.)(html|HTML|htm|HTM)$">
+ <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="text/html"/>
+ </map:match>
+ <map:match type="regexp" pattern="(.*\.)(xml)$">
+ <map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="text/xml"/>
+ </map:match>
<map:match type="regexp" pattern="(.*\.)(rng)$">
<map:read src="fallback://lenya/modules/{../1}/resources/{../2}.{../3}" mime-type="application/xml"/>
</map:match>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org