Changeset 1590 for trunk/server/common


Ignore:
Timestamp:
Jul 18, 2010, 7:02:40 PM (14 years ago)
Author:
andersk
Message:
Package new static-cat written in Haskell.

This adds support for Content-Encoding, If-Modified-Since, Range,
If-Range, and REQUEST_METHOD.
Location:
trunk/server/common
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/common/patches/httpd-suexec-scripts.patch

    r1474 r1590  
    5151  */
    5252 
    53 +#define STATIC_CAT_PATH "/usr/local/bin/static-cat"
     53+#define STATIC_CAT_PATH "/usr/bin/static-cat"
    5454+#define PHP_PATH "/usr/bin/php-cgi"
    5555+
     
    275275         exit(121);
    276276     }
    277 @@ -614,6 +730,20 @@
     277@@ -614,6 +730,23 @@
    278278     /*
    279279      * Execute the command, replacing our image with its own.
    280280      */
    281281+    if (is_static_extension(cmd)) {
    282 +        argv[2] = STATIC_CAT_PATH;
    283 +        execv(STATIC_CAT_PATH, &argv[2]);
    284 +        log_err("(%d)%s: static_cat exec failed (%s)\n", errno, strerror(errno), argv[2]);
     282+        if (setenv("PATH_TRANSLATED", cmd, 1) != 0) {
     283+            log_err("setenv failed\n");
     284+            exit(255);
     285+        }
     286+        execl(STATIC_CAT_PATH, STATIC_CAT_PATH, (const char *)NULL);
     287+        log_err("(%d)%s: static-cat exec failed (%s)\n", errno, strerror(errno), STATIC_CAT_PATH);
    285288+        exit(255);
    286289+    }
Note: See TracChangeset for help on using the changeset viewer.