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:
commit
a34edc8990
@ -88,6 +88,13 @@ template<typename T> size_t streamFile(T &file, String contentType){
|
|||||||
head += file.size();
|
head += file.size();
|
||||||
head += "\r\nConnection: close";
|
head += "\r\nConnection: close";
|
||||||
head += "\r\nAccess-Control-Allow-Origin: *";
|
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";
|
head += "\r\n\r\n";
|
||||||
_currentClient.print(head);
|
_currentClient.print(head);
|
||||||
head = String();
|
head = String();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user