Skip to content

Commit

Permalink
makefsdata: extend file type matching with .shtml and .shtm
Browse files Browse the repository at this point in the history
[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
  • Loading branch information
krzmaz authored and goldsimon committed Feb 19, 2024
1 parent cb51101 commit e799c26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/apps/http/makefsdata/makefsdata
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ while($file = <FILES>) {
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");
Expand Down

0 comments on commit e799c26

Please sign in to comment.