httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject [PATCH] Don't break backslash in SSI
Date Sun, 16 Feb 1997 20:23:38 GMT
This was discussed before. I can't say I love it, but here's a patch that fixes
it.

  * <!--#exec cmd="prog args\ with\ spaces"-->
    doesn't work anymore. It passes THREE arguments
    to prog ("args", "with" and "spaces), instead of
    ONE argument ("args with spaces"). [eb@via.ecp.fr]
    Either need to use \\ or change escaping to not escape things that
    aren't recognized as escape chars.

Index: mod_include.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_include.c,v
retrieving revision 1.21
diff -c -r1.21 mod_include.c
*** mod_include.c       1997/01/20 04:28:13     1.21
--- mod_include.c       1997/02/16 21:32:19
***************
*** 351,357 ****
      while ((ch = *in++) != '\0') {
          switch(ch) {
            case '\\':
!             *next++ = (*in != '\0') ? *in++ : '\0';
              break;
            case '$':
            {
--- 351,360 ----
      while ((ch = *in++) != '\0') {
          switch(ch) {
            case '\\':
!           if(*in == '$')
!               *next++=*in++;
!           else
!               *next++=ch;
              break;
            case '$':
            {

-- 
Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
Freelance Consultant and  Fax:   +44 (181) 994 6472
Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
London, England.          Apache-SSL author

Mime
View raw message