Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/ngx_postgres_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,9 @@ ngx_postgres_rewrite_value(ngx_conf_t *cf, ngx_postgres_rewrite_loc_conf_t *lcf,
ngx_http_script_compile_t sc;
ngx_http_script_value_code_t *val;
ngx_http_script_complex_value_code_t *complex;
#if (nginx_version >= 1031003)
ngx_http_script_complex_value_end_code_t *complex_end;
#endif

n = ngx_http_script_variables_count(value);

Expand Down Expand Up @@ -421,5 +424,16 @@ ngx_postgres_rewrite_value(ngx_conf_t *cf, ngx_postgres_rewrite_loc_conf_t *lcf,
return NGX_CONF_ERROR;
}

#if (nginx_version >= 1031003)
complex_end = ngx_http_script_add_code(lcf->codes,
sizeof(ngx_http_script_complex_value_end_code_t),
&complex);
if (complex_end == NULL) {
return NGX_CONF_ERROR;
}

complex_end->code = ngx_http_script_complex_value_end_code;
#endif

return NGX_CONF_OK;
}