1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-24 19:42:27 +03:00
Files
esp8266/libraries/ESP8266WebServer/src/detail/mimetable.h
s-hadinger 7c008e31bb Flash size reduction for mime-type (#7312)
* Flash size reduction for mime-type
* moving from fixed size strings to standard PROGMEM strings
* adding `#define MIMETYPE_MINIMAL` to reduce the footprint to
  mime-types that are strictly necessary

* Added MIMETYPE_MINIMAL conditionals
2020-05-18 20:16:11 -07:00

53 lines
576 B
C++

#ifndef __MIMETABLE_H__
#define __MIMETABLE_H__
#include "WString.h"
namespace mime
{
enum type
{
html,
htm,
txt,
#ifndef MIMETYPE_MINIMAL // allow to compile with only the strict minimum of mime-types
css,
js,
json,
png,
gif,
jpg,
jpeg,
ico,
svg,
ttf,
otf,
woff,
woff2,
eot,
sfnt,
xml,
pdf,
zip,
appcache,
#endif // MIMETYPE_MINIMAL
gz,
none,
maxType
};
struct Entry
{
const char * endsWith;
const char * mimeType;
};
extern const Entry mimeTable[maxType];
String getContentType(const String& path);
}
#endif