You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h
+7
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,13 @@ class StaticRequestHandler : public RequestHandler {
96
96
97
97
String contentType = getContentType(path);
98
98
99
+
// If content type not matched on path, then try for uri
100
+
// Useful for minified javascript et al.
101
+
if (contentType.equals("application/octet-stream"))
102
+
{
103
+
contentType = getContentType(requestUri);
104
+
}
105
+
99
106
// look for gz file, only if the original specified path is not a gz. So part only works to send gzip via content encoding when a non compressed is asked for
100
107
// if you point the the path to gzip you will serve the gzip as content type "application/x-gzip", not text or javascript etc...
0 commit comments