html5 fallback
This commit is contained in:
parent
45517a03cf
commit
5516fe8910
@ -312,9 +312,16 @@ handle_static_asset(struct http_transaction *ta, char *basedir)
|
|||||||
if (access(fname, R_OK)) {
|
if (access(fname, R_OK)) {
|
||||||
if (errno == EACCES)
|
if (errno == EACCES)
|
||||||
return send_error(ta, HTTP_PERMISSION_DENIED, "Permission denied.");
|
return send_error(ta, HTTP_PERMISSION_DENIED, "Permission denied.");
|
||||||
else
|
else {
|
||||||
|
if (html5_fallback) {
|
||||||
|
memset(fname, 0, PATH_MAX);
|
||||||
|
snprintf(fname, sizeof fname, "%s%s", server_root, "/index.html");
|
||||||
|
} else {
|
||||||
return send_not_found(ta);
|
return send_not_found(ta);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// Determine file size
|
// Determine file size
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user