White space formatting fixes
Closes: <https://github.com/nginx/unit/pull/1062>
This commit is contained in:
@@ -332,7 +332,7 @@ public class Util {
|
|||||||
|
|
||||||
public static List<DecoderEntry> getDecoders(
|
public static List<DecoderEntry> getDecoders(
|
||||||
List<Class<? extends Decoder>> decoderClazzes)
|
List<Class<? extends Decoder>> decoderClazzes)
|
||||||
throws DeploymentException{
|
throws DeploymentException {
|
||||||
|
|
||||||
List<DecoderEntry> result = new ArrayList<>();
|
List<DecoderEntry> result = new ArrayList<>();
|
||||||
if (decoderClazzes != null) {
|
if (decoderClazzes != null) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ package nginx.unit.websocket.server;
|
|||||||
import javax.servlet.http.HttpSessionEvent;
|
import javax.servlet.http.HttpSessionEvent;
|
||||||
import javax.servlet.http.HttpSessionListener;
|
import javax.servlet.http.HttpSessionListener;
|
||||||
|
|
||||||
public class WsSessionListener implements HttpSessionListener{
|
public class WsSessionListener implements HttpSessionListener {
|
||||||
|
|
||||||
private final WsServerContainer wsServerContainer;
|
private final WsServerContainer wsServerContainer;
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ nxt_clone_credential_map_set(nxt_task_t *task, const char* mapfile, pid_t pid,
|
|||||||
return NXT_ERROR;
|
return NXT_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i+1 < map->size) {
|
if (i + 1 < map->size) {
|
||||||
*p++ = '\n';
|
*p++ = '\n';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -382,13 +382,13 @@ nxt_clone_vldt_credential_gidmap(nxt_task_t *task,
|
|||||||
m = map->map[j];
|
m = map->map[j];
|
||||||
|
|
||||||
if (!base_ok && creds->base_gid >= (nxt_gid_t) m.container
|
if (!base_ok && creds->base_gid >= (nxt_gid_t) m.container
|
||||||
&& creds->base_gid < (nxt_gid_t) (m.container+m.size))
|
&& creds->base_gid < (nxt_gid_t) (m.container + m.size))
|
||||||
{
|
{
|
||||||
base_ok = 1;
|
base_ok = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (creds->gids[i] >= (nxt_gid_t) m.container
|
if (creds->gids[i] >= (nxt_gid_t) m.container
|
||||||
&& creds->gids[i] < (nxt_gid_t) (m.container+m.size))
|
&& creds->gids[i] < (nxt_gid_t) (m.container + m.size))
|
||||||
{
|
{
|
||||||
gid_ok = 1;
|
gid_ok = 1;
|
||||||
break;
|
break;
|
||||||
@@ -405,7 +405,7 @@ nxt_clone_vldt_credential_gidmap(nxt_task_t *task,
|
|||||||
m = map->map[i];
|
m = map->map[i];
|
||||||
|
|
||||||
if (creds->base_gid >= (nxt_gid_t) m.container
|
if (creds->base_gid >= (nxt_gid_t) m.container
|
||||||
&& creds->base_gid < (nxt_gid_t) (m.container+m.size))
|
&& creds->base_gid < (nxt_gid_t) (m.container + m.size))
|
||||||
{
|
{
|
||||||
base_ok = 1;
|
base_ok = 1;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ static nxt_int_t nxt_ssl_conf_commands(nxt_task_t *task, SSL_CTX *ctx,
|
|||||||
static nxt_int_t nxt_tls_ticket_keys(nxt_task_t *task, SSL_CTX *ctx,
|
static nxt_int_t nxt_tls_ticket_keys(nxt_task_t *task, SSL_CTX *ctx,
|
||||||
nxt_tls_init_t *tls_init, nxt_mp_t *mp);
|
nxt_tls_init_t *tls_init, nxt_mp_t *mp);
|
||||||
static int nxt_tls_ticket_key_callback(SSL *s, unsigned char *name,
|
static int nxt_tls_ticket_key_callback(SSL *s, unsigned char *name,
|
||||||
unsigned char *iv, EVP_CIPHER_CTX *ectx,HMAC_CTX *hctx, int enc);
|
unsigned char *iv, EVP_CIPHER_CTX *ectx, HMAC_CTX *hctx, int enc);
|
||||||
#endif
|
#endif
|
||||||
static void nxt_ssl_session_cache(SSL_CTX *ctx, size_t cache_size,
|
static void nxt_ssl_session_cache(SSL_CTX *ctx, size_t cache_size,
|
||||||
time_t timeout);
|
time_t timeout);
|
||||||
|
|||||||
@@ -2971,7 +2971,7 @@ nxt_router_tls_rpc_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg,
|
|||||||
|
|
||||||
mp = tmcf->router_conf->mem_pool;
|
mp = tmcf->router_conf->mem_pool;
|
||||||
|
|
||||||
if (tls->socket_conf->tls == NULL){
|
if (tls->socket_conf->tls == NULL) {
|
||||||
tlscf = nxt_mp_zget(mp, sizeof(nxt_tls_conf_t));
|
tlscf = nxt_mp_zget(mp, sizeof(nxt_tls_conf_t));
|
||||||
if (nxt_slow_path(tlscf == NULL)) {
|
if (nxt_slow_path(tlscf == NULL)) {
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|||||||
@@ -77,9 +77,9 @@ SYNOPSIS
|
|||||||
Subcommands
|
Subcommands
|
||||||
├── cmd [-h]
|
├── cmd [-h]
|
||||||
├── ctl [-h] [-s SOCK] SUBCOMMAND [ARGS]
|
├── ctl [-h] [-s SOCK] SUBCOMMAND [ARGS]
|
||||||
│ ├── edit [-h] PATH
|
│ ├── edit [-h] PATH
|
||||||
│ ├── http [-h] [-c CURLOPT] METHOD PATH
|
│ ├── http [-h] [-c CURLOPT] METHOD PATH
|
||||||
│ └── insert [-h] PATH INDEX
|
│ └── insert [-h] PATH INDEX
|
||||||
├── freeport [-h]
|
├── freeport [-h]
|
||||||
├── json-ins [-hn] JSON INDEX
|
├── json-ins [-hn] JSON INDEX
|
||||||
├── os-probe [-h]
|
├── os-probe [-h]
|
||||||
@@ -87,8 +87,8 @@ SYNOPSIS
|
|||||||
├── repo-config [-hn] [PKG-MANAGER OS-NAME OS-VERSION]
|
├── repo-config [-hn] [PKG-MANAGER OS-NAME OS-VERSION]
|
||||||
├── restart [-hls]
|
├── restart [-hls]
|
||||||
├── sock [-h] SUBCOMMAND [ARGS]
|
├── sock [-h] SUBCOMMAND [ARGS]
|
||||||
│ ├── filter [-chs]
|
│ ├── filter [-chs]
|
||||||
│ └── find [-h]
|
│ └── find [-h]
|
||||||
└── welcome [-hn]
|
└── welcome [-hn]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# unitc - a curl wrapper for configuring NGINX Unit
|
# unitc - a curl wrapper for configuring NGINX Unit
|
||||||
# https://github.com/nginx/unit/tree/master/tools
|
# https://github.com/nginx/unit/tree/master/tools
|
||||||
# NGINX, Inc. (c) 2023
|
# NGINX, Inc. (c) 2023
|
||||||
|
|
||||||
# Defaults
|
# Defaults
|
||||||
@@ -292,7 +292,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
NEW_ELEMENT=$(cat ${CONF_FILES[@]})
|
NEW_ELEMENT=$(cat ${CONF_FILES[@]})
|
||||||
echo $NEW_ELEMENT | jq > /dev/null || exit $? # Test the input is valid JSON before proceeding
|
echo $NEW_ELEMENT | jq > /dev/null || exit $? # Test the input is valid JSON before proceeding
|
||||||
OLD_ARRAY=$($RPC_CMD curl -s $UNIT_CTRL$URI)
|
OLD_ARRAY=$($RPC_CMD curl -s $UNIT_CTRL$URI)
|
||||||
if [ "$(echo $OLD_ARRAY | jq -r type)" = "array" ]; then
|
if [ "$(echo $OLD_ARRAY | jq -r type)" = "array" ]; then
|
||||||
echo $OLD_ARRAY | jq ". |= [$NEW_ELEMENT] + ." | $RPC_CMD curl -X PUT --data-binary @- $UNIT_CTRL$URI 2> /tmp/${0##*/}.$$ | $OUTPUT
|
echo $OLD_ARRAY | jq ". |= [$NEW_ELEMENT] + ." | $RPC_CMD curl -X PUT --data-binary @- $UNIT_CTRL$URI 2> /tmp/${0##*/}.$$ | $OUTPUT
|
||||||
|
|||||||
Reference in New Issue
Block a user