Changeset 1021

Show
Ignore:
Timestamp:
03/04/2006 03:12:17 PM (3 years ago)
Author:
jan
Message:

fixed handling of subdirs in ssi (fixes #462), patch by robe

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/lighttpd-merge-1.4.x/src/mod_ssi.c

    r790 r1021  
    519519                                buffer_copy_string_len(p->stat_fn, con->physical.path->ptr, sl - con->physical.path->ptr + 1); 
    520520                        } 
    521                  
    522                         /* fn */ 
    523                         if (NULL == (sl = strrchr(file_path, '/'))) { 
    524                                 buffer_append_string(p->stat_fn, file_path); 
    525                         } else { 
    526                                 buffer_append_string(p->stat_fn, sl + 1); 
    527                         } 
     521 
     522                        buffer_copy_string(srv->tmp_buf, file_path);  
     523                        buffer_urldecode_path(srv->tmp_buf); 
     524                        buffer_path_simplify(srv->tmp_buf, srv->tmp_buf);  
     525                        buffer_append_string_buffer(p->stat_fn, srv->tmp_buf);  
    528526                } else { 
    529527                        /* virtual */ 
     
    975973        for (i = 0; (n = pcre_exec(p->ssi_regex, NULL, s.start, s.size, i, 0, ovec, N * 3)) > 0; i = ovec[1]) { 
    976974                const char **l; 
    977                 /* take every think from last offset to current match pos */ 
     975                /* take everything from last offset to current match pos */ 
    978976                 
    979977                if (!p->if_is_false) chunkqueue_append_file(con->write_queue, con->physical.path, i, ovec[0] - i);