ngx_http_variable_is_args(ngx_http_request_t *r,
ngx_http_variable_value_t *v, uintptr_t data)
{
- v->valid = 1;
- v->no_cacheable = 0;
- v->not_found = 0;
-
if (r->args.len == 0) {
- v->len = 0;
- v->data = NULL;
+ *v = ngx_http_variable_null_value;
return NGX_OK;
}
v->len = 1;
+ v->valid = 1;
+ v->no_cacheable = 0;
+ v->not_found = 0;
v->data = (u_char *) "?";
return NGX_OK;
return NGX_OK;
}
- v->len = 0;
- v->valid = 1;
- v->no_cacheable = 0;
- v->not_found = 0;
- v->data = (u_char *) "";
+ *v = ngx_http_variable_null_value;
return NGX_OK;
}