diff options
author | Zhidao HONG <z.hong@f5.com> | 2021-07-23 09:14:43 +0800 |
---|---|---|
committer | Zhidao HONG <z.hong@f5.com> | 2021-07-23 09:14:43 +0800 |
commit | a3df6efc8d5994899a985080b574d9043ecd80f3 (patch) | |
tree | 550f48721da8583064a973613401f57c83c8e76a /src/nxt_conf_validation.c | |
parent | 960ffc99677b8451a3cc4ea7bc053b3c123e4e1b (diff) | |
download | unit-a3df6efc8d5994899a985080b574d9043ecd80f3.tar.gz unit-a3df6efc8d5994899a985080b574d9043ecd80f3.tar.bz2 |
Router: split nxt_http_static_conf_t from nxt_http_action_t.
No functional changes.
Diffstat (limited to 'src/nxt_conf_validation.c')
-rw-r--r-- | src/nxt_conf_validation.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nxt_conf_validation.c b/src/nxt_conf_validation.c index fd57a983..0ec2e811 100644 --- a/src/nxt_conf_validation.c +++ b/src/nxt_conf_validation.c @@ -1277,7 +1277,7 @@ static nxt_int_t nxt_conf_vldt_mtypes_extension(nxt_conf_validation_t *vldt, nxt_conf_value_t *value) { - nxt_str_t ext, *dup_type; + nxt_str_t exten, *dup_type; nxt_conf_vldt_mtypes_ctx_t *ctx; ctx = vldt->ctx; @@ -1287,24 +1287,24 @@ nxt_conf_vldt_mtypes_extension(nxt_conf_validation_t *vldt, "contain only strings.", ctx->type); } - nxt_conf_get_string(value, &ext); + nxt_conf_get_string(value, &exten); - if (ext.length == 0) { + if (exten.length == 0) { return nxt_conf_vldt_error(vldt, "An empty file extension for " "the \"%V\" MIME type.", ctx->type); } - dup_type = nxt_http_static_mtypes_hash_find(&ctx->hash, &ext); + dup_type = nxt_http_static_mtype_get(&ctx->hash, &exten); if (dup_type->length != 0) { return nxt_conf_vldt_error(vldt, "The \"%V\" file extension has been " "declared for \"%V\" and \"%V\" " "MIME types at the same time.", - &ext, dup_type, ctx->type); + &exten, dup_type, ctx->type); } - return nxt_http_static_mtypes_hash_add(ctx->pool, &ctx->hash, - &ext, ctx->type); + return nxt_http_static_mtypes_hash_add(ctx->pool, &ctx->hash, &exten, + ctx->type); } |