Changeset 1464 for trunk/server


Ignore:
Timestamp:
Feb 12, 2010, 3:52:35 AM (15 years ago)
Author:
mitchb
Message:
What's that?  I can't hear you over the static!

o Make Apache, suEXEC, and static-cat case-insensitive about extensions
o Add wav, mid, and midi as static extensions
o Add missing mime-type for svg files
Location:
trunk/server/common
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/common/oursrc/execsys/mime.types

    r945 r1464  
    399399image/prs.btif
    400400image/prs.pti
     401image/svg+xml                   svg
    401402image/tiff                      tiff tif
    402403image/vnd.cns.inf2
  • trunk/server/common/oursrc/execsys/static-cat.c.pre

    r104 r1464  
    336336                        exit(0);
    337337                for (j = 0; j < 2 * NEXTS; j += 2) {
    338                         if (strcmp(map[j], &argv[1][i]) == 0) {
     338                        if (strcasecmp(map[j], &argv[1][i]) == 0) {
    339339                                content_type = map[j + 1];
    340340                        }
  • trunk/server/common/oursrc/execsys/upd-execsys

    r1358 r1464  
    6161 avi
    6262 il
    63  JPG
    6463 xhtml
    6564 svg
    6665 xaml
    6766 xap
     67 wav
     68 mid
     69 midi
    6870);
    6971
     
    7779        foreach my $ext (split " ", $exts) {
    7880                $map{$ext} = $type;
    79                 $map{uc($ext)} = $type;
    8081        }
    8182}
     
    8990foreach my $ext (@dynamic, @static) {
    9091        print CONF <<END
    91 <Files *.$ext>
     92<FilesMatch "(?i)\\.$ext\$">
    9293        SetHandler cgi-script
    9394        Options +ExecCGI
    94 </Files>
     95</FilesMatch>
    9596
    9697END
  • trunk/server/common/patches/httpd-suexec-scripts.patch

    r1355 r1464  
    7373 
    7474     /* variable name is */
    75 @@ -245,9 +250,67 @@
     75@@ -245,9 +250,69 @@
    7676     environ = cleanenv;
    7777 }
     
    108108+    "avi",
    109109+    "il",
    110 +    "JPG",
    111110+    "xhtml",
    112111+    "svg",
    113112+    "xaml",
    114113+    "xap",
     114+    "wav",
     115+    "mid",
     116+    "midi",
    115117+    NULL
    116118+};
     
    122124+    if (extension == NULL) return 0;
    123125+    for (p = static_extensions; *p; ++p) {
    124 +        if (strcmp(extension + 1, *p) == 0) return 1;
     126+        if (strcasecmp(extension + 1, *p) == 0) return 1;
    125127+    }
    126128+    return 0;
Note: See TracChangeset for help on using the changeset viewer.