]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd-empty_cgi_handler.patch
- fixess for issues #10 and #11
[packages/lighttpd.git] / lighttpd-empty_cgi_handler.patch
1 --- ./src/cgi.c~        2005-02-08 00:08:01.000000000 +0200
2 +++ ./src/cgi.c 2005-02-08 00:13:02.000000000 +0200
3 @@ -686,16 +686,18 @@
4         
5         int to_cgi_fds[2];
6         int from_cgi_fds[2];
7 -       struct stat st;
8 -       
9 +
10  #ifndef __WIN32        
11 +       struct stat st;
12         
13 -       /* stat the exec file */
14 -       if (-1 == (stat(cgi_handler->ptr, &st))) {
15 -               log_error_write(srv, __FILE__, __LINE__, "sbss", 
16 -                               "stat for cgi-handler", cgi_handler,
17 -                               "failed:", strerror(errno));
18 -               return -1;
19 +       if (cgi_handler->used > 1) {
20 +               /* stat the exec file */
21 +               if (-1 == (stat(cgi_handler->ptr, &st))) {
22 +                       log_error_write(srv, __FILE__, __LINE__, "sbss", 
23 +                                       "stat for cgi-handler", cgi_handler,
24 +                                       "failed:", strerror(errno));
25 +                       return -1;
26 +               }
27         }
28         
29         if (pipe(to_cgi_fds)) {
This page took 0.040915 seconds and 3 git commands to generate.