diff options
author | Peter Bozsó | 2016-07-28 20:01:33 +0200 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 64b361b33545d2ffc1620a7bf4eb248afc9797f4 (patch) | |
tree | 0ff5520981014163db640b95f692a8003c91506e /backends/networking/sdl_net/localwebserver.cpp | |
parent | b68bd78b444f9f533796ba37282c66688adb5f52 (diff) | |
download | scummvm-rg350-64b361b33545d2ffc1620a7bf4eb248afc9797f4.tar.gz scummvm-rg350-64b361b33545d2ffc1620a7bf4eb248afc9797f4.tar.bz2 scummvm-rg350-64b361b33545d2ffc1620a7bf4eb248afc9797f4.zip |
CLOUD: Move determineMimeType to ResourceHandler
Diffstat (limited to 'backends/networking/sdl_net/localwebserver.cpp')
-rw-r--r-- | backends/networking/sdl_net/localwebserver.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/backends/networking/sdl_net/localwebserver.cpp b/backends/networking/sdl_net/localwebserver.cpp index 6da27a668f..afdee5585f 100644 --- a/backends/networking/sdl_net/localwebserver.cpp +++ b/backends/networking/sdl_net/localwebserver.cpp @@ -368,26 +368,6 @@ void LocalWebserver::setClientRedirectHandler(Client &client, Common::SeekableRe client.setHandler(handler); } -const char *LocalWebserver::determineMimeType(Common::String &filename) { - // text - if (filename.hasSuffix(".html")) return "text/html"; - if (filename.hasSuffix(".css")) return "text/css"; - if (filename.hasSuffix(".txt")) return "text/plain"; - if (filename.hasSuffix(".js")) return "application/javascript"; - - // images - if (filename.hasSuffix(".jpeg") || filename.hasSuffix(".jpg") || filename.hasSuffix(".jpe")) return "image/jpeg"; - if (filename.hasSuffix(".gif")) return "image/gif"; - if (filename.hasSuffix(".png")) return "image/png"; - if (filename.hasSuffix(".svg")) return "image/svg+xml"; - if (filename.hasSuffix(".tiff")) return "image/tiff"; - if (filename.hasSuffix(".ico")) return "image/vnd.microsoft.icon"; - if (filename.hasSuffix(".wbmp")) return "image/vnd.wap.wbmp"; - - if (filename.hasSuffix(".zip")) return "application/zip"; - return "application/octet-stream"; -} - namespace { int hexDigit(char c) { if ('0' <= c && c <= '9') return c - '0'; |