Ticket #1600: lighttpd-1.5-fix-request-uri-rewrite.patch

File lighttpd-1.5-fix-request-uri-rewrite.patch, 0.9 kB (added by hoffie, 3 months ago)
  • src/mod_proxy_core.c

    old new  
    12911291#endif 
    12921292        } 
    12931293 
     1294        /* populate sess->request_uri with the actually requested path 
     1295         * (con->request.uri). if we have pcre and there is a _uri request 
     1296         * rewrite, it will be overwritten later 
     1297         */ 
     1298        buffer_copy_string_buffer(sess->request_uri, con->request.uri); 
     1299 
    12941300        /* check if we want to rewrite the uri */ 
    12951301#ifdef HAVE_PCRE_H 
    12961302        for (i = 0; i < p->conf.request_rewrites->used; i++) { 
     
    13671373 
    13681374                } 
    13691375        } 
    1370  
    1371         if (i == p->conf.request_rewrites->used) { 
    1372                 buffer_copy_string_buffer(sess->request_uri, con->request.uri); 
    1373         } 
    1374 #else 
    1375         buffer_copy_string_buffer(sess->request_uri, con->request.uri); 
    13761376#endif 
    13771377 
    13781378        proxy_encode_request_headers(srv, sess, con->recv);