summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_http_variables.c26
-rw-r--r--src/nxt_var.c13
-rw-r--r--src/nxt_var.h1
3 files changed, 14 insertions, 26 deletions
diff --git a/src/nxt_http_variables.c b/src/nxt_http_variables.c
index b765e177..c48f9ca3 100644
--- a/src/nxt_http_variables.c
+++ b/src/nxt_http_variables.c
@@ -7,14 +7,12 @@
#include <nxt_http.h>
-static nxt_int_t nxt_http_var_method(nxt_task_t *task, nxt_var_query_t *query,
- nxt_str_t *str, void *ctx);
-static nxt_int_t nxt_http_var_request_uri(nxt_task_t *task,
- nxt_var_query_t *query, nxt_str_t *str, void *ctx);
-static nxt_int_t nxt_http_var_uri(nxt_task_t *task, nxt_var_query_t *query,
- nxt_str_t *str, void *ctx);
-static nxt_int_t nxt_http_var_host(nxt_task_t *task, nxt_var_query_t *query,
- nxt_str_t *str, void *ctx);
+static nxt_int_t nxt_http_var_method(nxt_task_t *task, nxt_str_t *str,
+ void *ctx);
+static nxt_int_t nxt_http_var_request_uri(nxt_task_t *task, nxt_str_t *str,
+ void *ctx);
+static nxt_int_t nxt_http_var_uri(nxt_task_t *task, nxt_str_t *str, void *ctx);
+static nxt_int_t nxt_http_var_host(nxt_task_t *task, nxt_str_t *str, void *ctx);
static nxt_var_decl_t nxt_http_vars[] = {
@@ -44,8 +42,7 @@ nxt_http_register_variables(void)
static nxt_int_t
-nxt_http_var_method(nxt_task_t *task, nxt_var_query_t *query, nxt_str_t *str,
- void *ctx)
+nxt_http_var_method(nxt_task_t *task, nxt_str_t *str, void *ctx)
{
nxt_http_request_t *r;
@@ -58,8 +55,7 @@ nxt_http_var_method(nxt_task_t *task, nxt_var_query_t *query, nxt_str_t *str,
static nxt_int_t
-nxt_http_var_request_uri(nxt_task_t *task, nxt_var_query_t *query,
- nxt_str_t *str, void *ctx)
+nxt_http_var_request_uri(nxt_task_t *task, nxt_str_t *str, void *ctx)
{
nxt_http_request_t *r;
@@ -72,8 +68,7 @@ nxt_http_var_request_uri(nxt_task_t *task, nxt_var_query_t *query,
static nxt_int_t
-nxt_http_var_uri(nxt_task_t *task, nxt_var_query_t *query, nxt_str_t *str,
- void *ctx)
+nxt_http_var_uri(nxt_task_t *task, nxt_str_t *str, void *ctx)
{
nxt_http_request_t *r;
@@ -86,8 +81,7 @@ nxt_http_var_uri(nxt_task_t *task, nxt_var_query_t *query, nxt_str_t *str,
static nxt_int_t
-nxt_http_var_host(nxt_task_t *task, nxt_var_query_t *query, nxt_str_t *str,
- void *ctx)
+nxt_http_var_host(nxt_task_t *task, nxt_str_t *str, void *ctx)
{
nxt_http_request_t *r;
diff --git a/src/nxt_var.c b/src/nxt_var.c
index 0a722d17..458ba678 100644
--- a/src/nxt_var.c
+++ b/src/nxt_var.c
@@ -494,17 +494,12 @@ nxt_var_query(nxt_task_t *task, nxt_var_query_t *query, nxt_var_t *var,
continue; /* NXT_DECLINED */
}
- ret = nxt_var_index[index](task, query, value, query->ctx);
+ ret = nxt_var_index[index](task, value, query->ctx);
+ if (nxt_slow_path(ret != NXT_OK)) {
+ goto fail;
+ }
value = NULL;
-
- if (ret != NXT_OK) {
- if (nxt_slow_path(ret != NXT_AGAIN)) {
- goto fail;
- }
-
- query->waiting++;
- }
}
query->spare = value;
diff --git a/src/nxt_var.h b/src/nxt_var.h
index 3b7d0c28..7fef0278 100644
--- a/src/nxt_var.h
+++ b/src/nxt_var.h
@@ -12,7 +12,6 @@ typedef struct nxt_var_query_s nxt_var_query_t;
typedef nxt_int_t (*nxt_var_handler_t)(nxt_task_t *task,
- nxt_var_query_t *query,
nxt_str_t *str,
void *ctx);