You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ro...@imdb.com> on 1997/05/18 14:40:00 UTC

Bug in mod_includes (fwd)


I tried to find something that'd work for him but had no luck.

---------- Forwarded message ----------
Date: Sat, 17 May 1997 15:23:50 +0930 (ACST)
From: Dan Shearer <ds...@spri.levels.unisa.edu.au>
To: apache-bugs@apache.org
Subject: Bug in mod_includes

Apache team,

I am enjoying using xssi! I just discovered a small bug which is important
if you want to do things with filenames. As well as fixing the bug though
it would be good if there was a way of avoiding concatonation with spaces.

manual/mod/mod_include.html says:

>Anything that's not recognized as a variable or an operator is treated as
>a string. Strings can also be quoted: 'string'. Unquoted strings can't
>contain whitespace (blanks and tabs) because it is used to separate tokens
>such as variables. If multiple strings are found in a row, they are
>concatenated using blanks.

This is a bad idea because its a pain to deal with spaces in filenames. 
However, either this documentation is wrong or the implementation is
wrong because these are the results I get.  I am echoing the variable "f". 
$linkfile=="index" and $language=="fr". A "*" indicates a space in the
output.

code							     result
----							     ------

<!--#set var="f" value="$linkfile_$thislang.shtml" -->	   fr.shtml
<!--#set var="f" value="$linkfile _ $thislang.shtml" -->   index*_*fr.shtml
<!--#set var="f" value="'$linkfile'_'$thislang.shtml'" -->  'index'_'fr.shtml'

I have also tried variations on 

  <!--#exec cmd="/usr/bin/perl -e \'print \"<--#set var=\'f\'\",\"
        \"value=\" \'$thislang.shtml\' -->\ ;\'"-->
  <!--#echo var="f" -->

But firstly Apache doesn't seem to run the output of an exec through the
xssi module again (recursive xssi? why not!) and secondly the quotes were
getting a nightmare (the one given here isn't complex enough to do the job
and it still has a quote in the wrong place :-) 

Regards,

Dan Shearer
dan.shearer@unisa.edu.au





Re: Bug in mod_includes (fwd)

Posted by Paul Sutton <pa...@ukweb.com>.
On Sun, 18 May 1997, Rob Hartill wrote:
> I tried to find something that'd work for him but had no luck.
> 
> ---------- Forwarded message ----------
> Date: Sat, 17 May 1997 15:23:50 +0930 (ACST)
> From: Dan Shearer <ds...@spri.levels.unisa.edu.au>
> To: apache-bugs@apache.org
> Subject: Bug in mod_includes

> code							     result
> ----							     ------
> 
> <!--#set var="f" value="$linkfile_$thislang.shtml" -->	   fr.shtml
> <!--#set var="f" value="$linkfile _ $thislang.shtml" -->   index*_*fr.shtml
> <!--#set var="f" value="'$linkfile'_'$thislang.shtml'" -->  'index'_'fr.shtml'

Erm, I don't use SSI at all, but wasn't there an update some time ago to
allow {...} surrounded variable names, like in shell? I.e

  <!--#set var="f" value="${linkfile}_$thislang.shtml -->

Or have I misunderstood the problem?

//pcs