mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
add begin(port) to esp8266webserver, move some strings to flash, some refactoring (#4148)
* add begin(port) to esp8266webserver, move some strings to flash, some refactoring * Moved more strings to flash, unified some strings * move mimetable strings into a standalone file * more string moves to flash, remove duplicates, refactor of template method, minor styling * Reverted moving small string to flash (no heap advantage, reduces bin size)
This commit is contained in:
47
libraries/ESP8266WebServer/src/detail/mimetable.h
Normal file
47
libraries/ESP8266WebServer/src/detail/mimetable.h
Normal file
@ -0,0 +1,47 @@
|
||||
#ifndef __MIMETABLE_H__
|
||||
#define __MIMETABLE_H__
|
||||
|
||||
|
||||
namespace mime
|
||||
{
|
||||
|
||||
enum type
|
||||
{
|
||||
html,
|
||||
htm,
|
||||
css,
|
||||
txt,
|
||||
js,
|
||||
json,
|
||||
png,
|
||||
gif,
|
||||
jpg,
|
||||
ico,
|
||||
svg,
|
||||
ttf,
|
||||
otf,
|
||||
woff,
|
||||
woff2,
|
||||
eot,
|
||||
sfnt,
|
||||
xml,
|
||||
pdf,
|
||||
zip,
|
||||
gz,
|
||||
appcache,
|
||||
none,
|
||||
maxType
|
||||
};
|
||||
|
||||
struct Entry
|
||||
{
|
||||
const char endsWith[16];
|
||||
const char mimeType[32];
|
||||
};
|
||||
|
||||
|
||||
extern const Entry mimeTable[maxType];
|
||||
}
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user