Skip to content

Commit 20de6b8

Browse files
committed
Add SVG as file type and default to binary stream for static handler
1 parent 71347b8 commit 20de6b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@ class StaticRequestHandler : public RequestHandler {
7777
else if (path.endsWith(".gif")) return "image/gif";
7878
else if (path.endsWith(".jpg")) return "image/jpeg";
7979
else if (path.endsWith(".ico")) return "image/x-icon";
80+
else if (path.endsWith(".svg")) return "image/svg+xml";
8081
else if (path.endsWith(".xml")) return "text/xml";
8182
else if (path.endsWith(".pdf")) return "application/pdf";
8283
else if (path.endsWith(".zip")) return "application/zip";
83-
return "text/plain";
84+
return "application/octet-stream";
8485
}
8586

8687
protected:

0 commit comments

Comments
 (0)