1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Merge remote-tracking branch 'remotes/ficeto/esp8266' into esp8266

This commit is contained in:
Markus Sattler 2015-05-21 19:25:08 +02:00
commit a34edc8990

View File

@ -88,6 +88,13 @@ template<typename T> size_t streamFile(T &file, String contentType){
head += file.size();
head += "\r\nConnection: close";
head += "\r\nAccess-Control-Allow-Origin: *";
if(
String(file.name()).endsWith(".gz") &&
contentType != "application/x-gzip" &&
contentType != "application/octet-stream"
){
head += "\r\nContent-Encoding: gzip";
}
head += "\r\n\r\n";
_currentClient.print(head);
head = String();