Skip to content

Commit

Permalink
minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
lyokha committed Jul 12, 2022
1 parent ff46898 commit b3f4ea5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ngx_http_haskell_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1806,9 +1806,11 @@ ngx_http_haskell_run(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
mcf->request_var_name.data,
mcf->request_var_name.len);
expr.data[2 + mcf->request_var_name.len] = '}';
ngx_memcpy(expr.data + 2 + mcf->request_var_name.len + 1,
value[3].data,
value[3].len);
if (value[3].len > 0) {
ngx_memcpy(expr.data + 2 + mcf->request_var_name.len + 1,
value[3].data,
value[3].len);
}
ccv.value = &expr;
} else {
ccv.value = &value[3 + i];
Expand Down

0 comments on commit b3f4ea5

Please sign in to comment.