summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http_variables.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_http_variables.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nxt_http_variables.c b/src/nxt_http_variables.c
index 837ef7b0..5a632b24 100644
--- a/src/nxt_http_variables.c
+++ b/src/nxt_http_variables.c
@@ -7,6 +7,8 @@
#include <nxt_http.h>
+static nxt_int_t nxt_http_var_dollar(nxt_task_t *task, nxt_str_t *str,
+ void *ctx, uint16_t field);
static nxt_int_t nxt_http_var_method(nxt_task_t *task, nxt_str_t *str,
void *ctx, uint16_t field);
static nxt_int_t nxt_http_var_request_uri(nxt_task_t *task, nxt_str_t *str,
@@ -41,6 +43,9 @@ static nxt_int_t nxt_http_var_cookie(nxt_task_t *task, nxt_str_t *str,
static nxt_var_decl_t nxt_http_vars[] = {
{
+ .name = nxt_string("dollar"),
+ .handler = nxt_http_var_dollar,
+ }, {
.name = nxt_string("method"),
.handler = nxt_http_var_method,
}, {
@@ -97,6 +102,15 @@ nxt_http_register_variables(void)
static nxt_int_t
+nxt_http_var_dollar(nxt_task_t *task, nxt_str_t *str, void *ctx, uint16_t field)
+{
+ nxt_str_set(str, "$");
+
+ return NXT_OK;
+}
+
+
+static nxt_int_t
nxt_http_var_method(nxt_task_t *task, nxt_str_t *str, void *ctx, uint16_t field)
{
nxt_http_request_t *r;