From e799c266facc3c70190676eccad49d6c2db2caac Mon Sep 17 00:00:00 2001 From: Krzysztof Mazur Date: Sun, 14 Aug 2022 12:03:50 +0200 Subject: [PATCH] makefsdata: extend file type matching with .shtml and .shtm [Problem] When using makefsdata perl script to convert shtml files with SSI tags the shtml files get generated with text/plain content type, making browsers not render them correctly [Solution] Extend the regex to generate text/html content type for any of: .htm, .html, .shtm, .shtml extensions --- src/apps/http/makefsdata/makefsdata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/http/makefsdata/makefsdata b/src/apps/http/makefsdata/makefsdata index 667eb8885..7f1d4d2b7 100644 --- a/src/apps/http/makefsdata/makefsdata +++ b/src/apps/http/makefsdata/makefsdata @@ -21,7 +21,7 @@ while($file = ) { print(HEADER "HTTP/1.0 200 OK\r\n"); } print(HEADER "Server: lwIP/pre-0.6 (http://www.sics.se/~adam/lwip/)\r\n"); - if($file =~ /\.html$/) { + if($file =~ /\.s?html?$/) { print(HEADER "Content-type: text/html\r\n"); } elsif($file =~ /\.gif$/) { print(HEADER "Content-type: image/gif\r\n");