]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/asio/example/cpp03/http/server/mime_types.cpp
8a66683e0168e0a31e9d267e447c85b275d77d2a
5 // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11 #include "mime_types.hpp"
15 namespace mime_types
{
19 const char* extension
;
20 const char* mime_type
;
23 { "gif", "image/gif" },
24 { "htm", "text/html" },
25 { "html", "text/html" },
26 { "jpg", "image/jpeg" },
27 { "png", "image/png" },
28 { 0, 0 } // Marks end of list.
31 std::string
extension_to_type(const std::string
& extension
)
33 for (mapping
* m
= mappings
; m
->extension
; ++m
)
35 if (m
->extension
== extension
)
44 } // namespace mime_types