mirror of
https://github.com/nginx/nginx.git
synced 2025-07-24 14:16:20 +08:00
style fix: remove tabs
This commit is contained in:
parent
e5e4c0000d
commit
fb958946b5
@ -767,7 +767,7 @@ ngx_http_upstream_send_request(ngx_http_request_t *r, ngx_http_upstream_t *u)
|
||||
"http upstream send request");
|
||||
|
||||
if (!u->request_sent && ngx_http_upstream_test_connect(c) != NGX_OK) {
|
||||
ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_ERROR);
|
||||
ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -914,7 +914,7 @@ ngx_http_upstream_process_header(ngx_event_t *rev)
|
||||
}
|
||||
|
||||
if (!u->request_sent && ngx_http_upstream_test_connect(c) != NGX_OK) {
|
||||
ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_ERROR);
|
||||
ngx_http_upstream_next(r, u, NGX_HTTP_UPSTREAM_FT_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1259,33 +1259,33 @@ ngx_http_upstream_test_connect(ngx_connection_t *c)
|
||||
#if (NGX_HAVE_KQUEUE)
|
||||
|
||||
if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
|
||||
if (c->write->pending_eof) {
|
||||
(void) ngx_connection_error(c, c->write->kq_errno,
|
||||
"kevent() reported that connect() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
if (c->write->pending_eof) {
|
||||
(void) ngx_connection_error(c, c->write->kq_errno,
|
||||
"kevent() reported that connect() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
err = 0;
|
||||
len = sizeof(int);
|
||||
err = 0;
|
||||
len = sizeof(int);
|
||||
|
||||
/*
|
||||
* BSDs and Linux return 0 and set a pending error in err
|
||||
* Solaris returns -1 and sets errno
|
||||
*/
|
||||
/*
|
||||
* BSDs and Linux return 0 and set a pending error in err
|
||||
* Solaris returns -1 and sets errno
|
||||
*/
|
||||
|
||||
if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void *) &err, &len)
|
||||
== -1)
|
||||
{
|
||||
err = ngx_errno;
|
||||
}
|
||||
if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void *) &err, &len)
|
||||
== -1)
|
||||
{
|
||||
err = ngx_errno;
|
||||
}
|
||||
|
||||
if (err) {
|
||||
(void) ngx_connection_error(c, err, "connect() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
if (err) {
|
||||
(void) ngx_connection_error(c, err, "connect() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
return NGX_OK;
|
||||
|
@ -686,19 +686,19 @@ ngx_mail_auth_http_process_headers(ngx_mail_session_t *s,
|
||||
ctx->err.len = ctx->errcode.len + ctx->errmsg.len
|
||||
+ sizeof(" " CRLF) - 1;
|
||||
|
||||
p = ngx_palloc(s->connection->pool, ctx->err.len);
|
||||
if (p == NULL) {
|
||||
ngx_close_connection(ctx->peer.connection);
|
||||
ngx_destroy_pool(ctx->pool);
|
||||
ngx_mail_session_internal_server_error(s);
|
||||
return;
|
||||
}
|
||||
p = ngx_palloc(s->connection->pool, ctx->err.len);
|
||||
if (p == NULL) {
|
||||
ngx_close_connection(ctx->peer.connection);
|
||||
ngx_destroy_pool(ctx->pool);
|
||||
ngx_mail_session_internal_server_error(s);
|
||||
return;
|
||||
}
|
||||
|
||||
ctx->err.data = p;
|
||||
ctx->err.data = p;
|
||||
|
||||
p = ngx_cpymem(p, ctx->errcode.data, ctx->errcode.len);
|
||||
p = ngx_cpymem(p, ctx->errcode.data, ctx->errcode.len);
|
||||
*p++ = ' ';
|
||||
p = ngx_cpymem(p, ctx->errmsg.data, ctx->errmsg.len);
|
||||
p = ngx_cpymem(p, ctx->errmsg.data, ctx->errmsg.len);
|
||||
*p++ = CR; *p = LF;
|
||||
}
|
||||
|
||||
|
@ -297,19 +297,19 @@ ngx_mail_init_session(ngx_connection_t *c)
|
||||
- s->salt.data;
|
||||
|
||||
if (s->protocol == NGX_MAIL_POP3_PROTOCOL) {
|
||||
s->out.data = ngx_palloc(c->pool,
|
||||
s->out.data = ngx_palloc(c->pool,
|
||||
greetings[0].len + 1 + s->salt.len);
|
||||
if (s->out.data == NULL) {
|
||||
ngx_mail_session_internal_server_error(s);
|
||||
return;
|
||||
}
|
||||
if (s->out.data == NULL) {
|
||||
ngx_mail_session_internal_server_error(s);
|
||||
return;
|
||||
}
|
||||
|
||||
p = ngx_cpymem(s->out.data,
|
||||
p = ngx_cpymem(s->out.data,
|
||||
greetings[0].data, greetings[0].len - 2);
|
||||
*p++ = ' ';
|
||||
p = ngx_cpymem(p, s->salt.data, s->salt.len);
|
||||
*p++ = ' ';
|
||||
p = ngx_cpymem(p, s->salt.data, s->salt.len);
|
||||
|
||||
s->out.len = p - s->out.data;
|
||||
s->out.len = p - s->out.data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1408,31 +1408,31 @@ ngx_smtp_auth_state(ngx_event_t *rev)
|
||||
case NGX_SMTP_MAIL:
|
||||
|
||||
if (s->connection->log->log_level >= NGX_LOG_INFO) {
|
||||
l.len = s->buffer->last - s->buffer->start;
|
||||
l.data = s->buffer->start;
|
||||
l.len = s->buffer->last - s->buffer->start;
|
||||
l.data = s->buffer->start;
|
||||
|
||||
for (i = 0; i < l.len; i++) {
|
||||
ch = l.data[i];
|
||||
for (i = 0; i < l.len; i++) {
|
||||
ch = l.data[i];
|
||||
|
||||
if (ch != CR && ch != LF) {
|
||||
continue;
|
||||
}
|
||||
if (ch != CR && ch != LF) {
|
||||
continue;
|
||||
}
|
||||
|
||||
l.data[i] = ' ';
|
||||
}
|
||||
l.data[i] = ' ';
|
||||
}
|
||||
|
||||
while (i) {
|
||||
if (l.data[i - 1] != ' ') {
|
||||
break;
|
||||
}
|
||||
while (i) {
|
||||
if (l.data[i - 1] != ' ') {
|
||||
break;
|
||||
}
|
||||
|
||||
i--;
|
||||
}
|
||||
i--;
|
||||
}
|
||||
|
||||
l.len = i;
|
||||
l.len = i;
|
||||
|
||||
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
|
||||
"client was rejected: \"%V\"", &l);
|
||||
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
|
||||
"client was rejected: \"%V\"", &l);
|
||||
}
|
||||
|
||||
text = smtp_auth_required;
|
||||
|
@ -702,20 +702,20 @@ ngx_mail_proxy_read_response(ngx_mail_session_t *s, ngx_uint_t state)
|
||||
|
||||
case ngx_smtp_helo:
|
||||
case ngx_smtp_noxclient:
|
||||
if (p[0] == '2' && p[1] == '5' && p[2] == '0') {
|
||||
return NGX_OK;
|
||||
}
|
||||
break;
|
||||
if (p[0] == '2' && p[1] == '5' && p[2] == '0') {
|
||||
return NGX_OK;
|
||||
}
|
||||
break;
|
||||
|
||||
case ngx_smtp_start:
|
||||
case ngx_smtp_xclient:
|
||||
if (p[0] == '2' && p[1] == '2' && p[2] == '0') {
|
||||
return NGX_OK;
|
||||
}
|
||||
break;
|
||||
if (p[0] == '2' && p[1] == '2' && p[2] == '0') {
|
||||
return NGX_OK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
pcf = ngx_mail_get_module_srv_conf(s, ngx_mail_proxy_module);
|
||||
|
Loading…
Reference in New Issue
Block a user