Changeset 2997
- Timestamp:
- 2002-02-26T17:24:49+13:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/w32server/cgiwrapper.cpp
r2487 r2997 603 603 text_t mime = "unknown"; 604 604 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) { 606 610 if ((ext[0] == 'g' || ext[0] == 'G') && 607 611 (ext[1] == 'i' || ext[1] == 'I') && … … 620 624 (ext[2] == 'f' || ext[2] == 'F')) { 621 625 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"; 622 630 } else if ((ext[0] == 'd' || ext[0] == 'D') && 623 631 (ext[1] == 'o' || ext[1] == 'O') && … … 628 636 (ext[2] == 'f' || ext[2] == 'F')) { 629 637 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"; 630 646 } 631 647 } else if (len == 4) {
Note:
See TracChangeset
for help on using the changeset viewer.