diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-17 12:20:19 +0200 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-17 12:41:18 +0200 |
commit | 7662ec5f1bf27de981a8aa100ab2c5c3fa985269 (patch) | |
tree | 4bb25263407154da61163b772c37b0c9f4cbac0c | |
parent | ba20fa3939c1505866d715a5a1a43f61a4f8de17 (diff) | |
download | unit-7662ec5f1bf27de981a8aa100ab2c5c3fa985269.tar.gz unit-7662ec5f1bf27de981a8aa100ab2c5c3fa985269.tar.bz2 |
Wrapped debug code in '#if (NXT_DEBUG)'.
-rw-r--r-- | src/nxt_http_return.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nxt_http_return.c b/src/nxt_http_return.c index 8832941f..82c91568 100644 --- a/src/nxt_http_return.c +++ b/src/nxt_http_return.c @@ -73,12 +73,14 @@ nxt_http_return(nxt_task_t *task, nxt_http_request_t *r, nxt_http_action_t *action) { nxt_int_t ret; - nxt_str_t loc; nxt_http_return_ctx_t *ctx; nxt_http_return_conf_t *conf; conf = action->u.conf; +#if (NXT_DEBUG) + nxt_str_t loc; + if (conf->location == NULL) { nxt_str_set(&loc, ""); @@ -87,6 +89,7 @@ nxt_http_return(nxt_task_t *task, nxt_http_request_t *r, } nxt_debug(task, "http return: %d (loc: \"%V\")", conf->status, &loc); +#endif if (conf->status >= NXT_HTTP_BAD_REQUEST && conf->status <= NXT_HTTP_SERVER_ERROR_MAX) |