aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_script.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-09-02 14:37:16 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-09-02 14:37:16 +0000
commit94e9aaa8adb3405599f8591f721dd9eb9f58834a (patch)
tree4000008b103f1222cecfc51a3f1af58de2981853 /src/http/ngx_http_script.c
parenta256afd0649210dd04772d1b9d3a5e8c275e67ca (diff)
downloadnginx-94e9aaa8adb3405599f8591f721dd9eb9f58834a.tar.gz
nginx-94e9aaa8adb3405599f8591f721dd9eb9f58834a.zip
new ngx_http_secure_link_module with secure_link, secure_link_md5, and
secure_link_expires
Diffstat (limited to 'src/http/ngx_http_script.c')
-rw-r--r--src/http/ngx_http_script.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c
index 1474f3245..503c0f058 100644
--- a/src/http/ngx_http_script.c
+++ b/src/http/ngx_http_script.c
@@ -211,6 +211,42 @@ ngx_http_compile_complex_value(ngx_http_compile_complex_value_t *ccv)
}
+char *
+ngx_http_set_comlex_value_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
+{
+ char *p = conf;
+
+ ngx_str_t *value;
+ ngx_http_complex_value_t **cv;
+ ngx_http_compile_complex_value_t ccv;
+
+ cv = (ngx_http_complex_value_t **) (p + cmd->offset);
+
+ if (*cv != NULL) {
+ return "duplicate";
+ }
+
+ *cv = ngx_palloc(cf->pool, sizeof(ngx_http_complex_value_t));
+ if (*cv == NULL) {
+ return NGX_CONF_ERROR;
+ }
+
+ value = cf->args->elts;
+
+ ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
+
+ ccv.cf = cf;
+ ccv.value = &value[1];
+ ccv.complex_value = *cv;
+
+ if (ngx_http_compile_complex_value(&ccv) != NGX_OK) {
+ return NGX_CONF_ERROR;
+ }
+
+ return NGX_CONF_OK;
+}
+
+
ngx_int_t
ngx_http_test_predicates(ngx_http_request_t *r, ngx_array_t *predicates)
{