From: SourceForge.net <no...@so...> - 2009-01-16 11:00:15
|
Bugs item #2512978, was opened at 2009-01-16 11:00 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=117691&aid=2512978&group_id=17691 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: tw2000 (tw2000) Assigned to: Nobody/Anonymous (nobody) Summary: XQueryURLRewrite does not forwards to a file in a sub direct Initial Comment: Platform: Windows XP, java 1.5.0.15, 1.3.0dev, rev.8497 When a rule in controller.xql forwards to a file in a subdirectory, part of the original url is added as a prefix to the forwarded path. To reproduce the bug add the following code to controller.xql: let $parts := tokenize( replace($path,'\\', '/') , '/' ) let $dirs-only:= not(contains( $path, '.' )) ... else if( $parts[2] = 'rview' and $dirs-only ) then <dispatch xmlns="http://exist.sourceforge.net/NS/exist"> <forward url="rview/redirected.xql"> <add-parameter name="part-2" value="{$parts[2]}"/> <add-parameter name="part-3" value="{$parts[3]}"/> <add-parameter name="part-4" value="{$parts[4]}"/> <add-parameter name="part-5" value="{$parts[5]}"/> </forward> </dispatch> ... Test1: http://localhost:8080/exist/rview/home expected http://localhost:8080/exist/rview/redirected.xql?part-2=home result: http://localhost:8080/exist/rview/rview/redirected.xql with error: Cannot read source file D:\eXist\webapp\rview\rview\redirected.xql Test 2: http://localhost:8080/exist/rview/view/uk/111/xxx/zzz expected http://localhost:8080/exist/rview/redirected.xql?part-2=uk&part-3=111&part-4=xxx&part-5=zzz result: http://localhost:8080/exist/rview/view/uk/111/xxx/zzz/rview/redirected.xql with error: Cannot read source file D:\eXist\webapp\rview\view\uk\111\xxx\zzz\rview\redirected.xql ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=117691&aid=2512978&group_id=17691 |