Ticket #462: lighttpd-mod-ssi.patch

File lighttpd-mod-ssi.patch, 1.1 kB (added by robe, 3 years ago)
  • src/mod_ssi.c

     
    519519                                buffer_copy_string_len(p->stat_fn, con->physical.path->ptr, sl - con->physical.path->ptr + 1); 
    520520                        } 
    521521                 
    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                         } 
     522                        /* filename */ 
     523                        buffer_copy_string(srv->tmp_buf, file_path); 
     524                        buffer_path_simplify(srv->tmp_buf, srv->tmp_buf); 
     525                        buffer_append_string_buffer(p->stat_fn, srv->tmp_buf); 
     526 
    528527                } else { 
    529528                        /* virtual */ 
    530529                         
     
    974973#ifdef HAVE_PCRE_H       
    975974        for (i = 0; (n = pcre_exec(p->ssi_regex, NULL, s.start, s.size, i, 0, ovec, N * 3)) > 0; i = ovec[1]) { 
    976975                const char **l; 
    977                 /* take every think from last offset to current match pos */ 
     976                /* take everything from last offset to current match pos */ 
    978977                 
    979978                if (!p->if_is_false) chunkqueue_append_file(con->write_queue, con->physical.path, i, ovec[0] - i); 
    980979