Router: grouped app and share fields in nxt_http_action_t.

This is a prerequisite for further introduction of openat2() features.
No functional changes.
This commit is contained in:
Zhidao HONG
2021-04-22 13:13:06 +08:00
parent f90754f84a
commit 113afb09ea
5 changed files with 46 additions and 32 deletions

View File

@@ -49,8 +49,8 @@ nxt_http_static_handler(nxt_task_t *task, nxt_http_request_t *r,
if (nxt_slow_path(!nxt_str_eq(r->method, "GET", 3))) {
if (!nxt_str_eq(r->method, "HEAD", 4)) {
if (action->u.fallback != NULL) {
return action->u.fallback;
if (action->u.share.fallback != NULL) {
return action->u.share.fallback;
}
nxt_http_request_error(task, r, NXT_HTTP_METHOD_NOT_ALLOWED);
@@ -127,8 +127,8 @@ nxt_http_static_handler(nxt_task_t *task, nxt_http_request_t *r,
break;
}
if (level == NXT_LOG_ERR && action->u.fallback != NULL) {
return action->u.fallback;
if (level == NXT_LOG_ERR && action->u.share.fallback != NULL) {
return action->u.share.fallback;
}
if (status != NXT_HTTP_NOT_FOUND) {
@@ -230,8 +230,8 @@ nxt_http_static_handler(nxt_task_t *task, nxt_http_request_t *r,
nxt_file_close(task, f);
if (nxt_slow_path(!nxt_is_dir(&fi))) {
if (action->u.fallback != NULL) {
return action->u.fallback;
if (action->u.share.fallback != NULL) {
return action->u.share.fallback;
}
nxt_log(task, NXT_LOG_ERR, "\"%FN\" is not a regular file",