Changeset 2997


Ignore:
Timestamp:
2002-02-26T17:24:49+13:00 (22 years ago)
Author:
jrm21
Message:

added a couple more mime types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/w32server/cgiwrapper.cpp

    r2487 r2997  
    603603  text_t mime = "unknown";
    604604  int len = ext.size();
    605   if (len == 3) {
     605  if (len == 2) {
     606    if ((ext[0] == 'p' || ext[0] == 'P') &&
     607    (ext[1] == 's' || ext[1] == 'S'))
     608      mime = "application/postscript";
     609  }  else if (len == 3) {
    606610    if ((ext[0] == 'g' || ext[0] == 'G') &&
    607611    (ext[1] == 'i' || ext[1] == 'I') &&
     
    620624           (ext[2] == 'f' || ext[2] == 'F')) {
    621625      mime = "application/pdf";
     626    } else if ((ext[0] == 'p' || ext[0] == 'P') &&
     627           (ext[1] == 'n' || ext[1] == 'N') &&
     628           (ext[2] == 'g' || ext[2] == 'G')) {
     629      mime = "image/png";
    622630    } else if ((ext[0] == 'd' || ext[0] == 'D') &&
    623631           (ext[1] == 'o' || ext[1] == 'O') &&
     
    628636           (ext[2] == 'f' || ext[2] == 'F')) {
    629637      mime = "application/rtf";
     638    } else if ((ext[0] == 'x' || ext[0] == 'X') &&
     639           (ext[1] == 'l' || ext[1] == 'L') &&
     640           (ext[2] == 's' || ext[2] == 'S')) {
     641      mime = "application/vnd.ms-excel";
     642    } else if ((ext[0] == 'p' || ext[0] == 'P') &&
     643           (ext[1] == 'p' || ext[1] == 'P') &&
     644           (ext[2] == 'T' || ext[2] == 'T')) {
     645      mime = "application/vnd.ms-powerpoint";
    630646    }
    631647  } else if (len == 4) {
Note: See TracChangeset for help on using the changeset viewer.