Bug #795

mod_ssi (apparently) won't echo variables set using #set

Added by Anonymous 855 days ago. Updated 93 days ago.

Status:New Start:
Priority:Normal Due date:
Assigned to:jan % Done:

0%

Category:mod_ssi
Target version:-
Pending:

No

Resolution:


Description

With the sample SSI document:
<!--set var="foo" value="bar" -->
<!--echo var="foo" -->

Result: "(none)"

Expected result: "bar"

mod_ssi-echo-int-var.patch - Patch which works for me (647 Bytes) Anonymous, 08/02/2006 12:24 PM

mod_ssi-echo-ssi-var-1.5.0svn2299.patch - -- gw.lighttpd (680 Bytes) Anonymous, 08/31/2008 07:26 PM

mod_ssi-recursion-ssi-vars-fix-1.5.0svn2299.patch - And another patch against 1.5.0-svn r2299 if you also have ticket:536 (nested requests/recursive include) -- gw.lighttpd (1005 Bytes) Anonymous, 08/31/2008 08:04 PM

mod_ssi_echo-ssi-var_1.5.0svn2299.patch - Shorter version (778 Bytes) Anonymous, 09/02/2008 04:13 PM

History

08/31/2008 07:29 PM - Anonymous

I confirm that this patch is so trivial it just works! Therefore I've appended the patch against 1.5-svn revision 2299.

09/02/2008 04:12 PM - Anonymous

Ignore my previous patch mod_ssi-recursion-ssi-vars-fix-1.5.0svn2299.patch, because it is wrong!

First of all it looks like a hack and second it doesn't work right if you have multiple layers of nested requests. A correct implementation of a patch for making SSI variables be interpreted right in nested requests/recursive includes is in ticket:536 (apply both patches if you want SSI to work more as expected).

And also the mod_ssi-echo-ssi-var-1.5.0svn2299.patch could be written a little shorter/better: http://gw.tnode.com/0036-LighttpdDevelopment/Files-Patches/

-- gw.lighttpd

Also available in: Atom PDF