mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-24 19:42:27 +03:00
* 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
53 lines
576 B
C++
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
|