mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-31 13:00:49 +00:00
Add Content-Type header to the SSI files
This commit is contained in:
1 parent
3982e065c8
commit
655f9a9f79
5 files changed
+14
-2
No files matched your search
@@ -78,8 +78,9 @@ static char *mg_ssi(const char *path, const char *root, int depth) {
|
||||
|
||||
void mg_http_serve_ssi(struct mg_connection *c, const char *root,
|
||||
const char *fullpath) {
|
||||
const char *headers = "Content-Type: text/html; charset=utf-8\r\n";
|
||||
char *data = mg_ssi(fullpath, root, 0);
|
||||
mg_http_reply(c, 200, "", "%s", data == NULL ? "" : data);
|
||||
mg_http_reply(c, 200, headers, "%s", data == NULL ? "" : data);
|
||||
free(data);
|
||||
}
|
||||
#endif
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
#ifndef MONGOOSE_H
|
||||
#define MONGOOSE_H
|
||||
|
||||
|
||||
Reference in new issue
Block a user