Mercurial > hg > nginx
diff src/imap/ngx_imap_handler.c @ 525:09b42134ac0c release-0.1.37
nginx-0.1.37-RELEASE import
*) Change: now the "\n" is added to the end of the "nginx.pid" file.
*) Bugfix: the responses may be transferred not completely, if many
parts or the big parts were included by SSI.
*) Bugfix: if all backends had returned the 404 reponse and the
"http_404" parameter of the "proxy_next_upstream" or
"fastcgi_next_upstream" directives was used, then nginx started to
request all backends again.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 23 Jun 2005 13:41:06 +0000 |
parents | 6f00349b98e5 |
children | 7fa11e5c6e96 |
line wrap: on
line diff
--- a/src/imap/ngx_imap_handler.c Wed Jun 15 18:33:41 2005 +0000 +++ b/src/imap/ngx_imap_handler.c Thu Jun 23 13:41:06 2005 +0000 @@ -24,6 +24,11 @@ ngx_string("* OK " NGINX_VER " ready" CRLF) }; +static ngx_str_t internal_server_errors[] = { + ngx_string("-ERR internal server error" CRLF), + ngx_string("* BAD internal server error" CRLF), +}; + static u_char pop3_ok[] = "+OK" CRLF; static u_char pop3_invalid_command[] = "-ERR invalid command" CRLF; @@ -342,6 +347,16 @@ void +ngx_imap_session_internal_server_error(ngx_imap_session_t *s) +{ + (void) ngx_send(s->connection, internal_server_errors[s->protocol].data, + internal_server_errors[s->protocol].len); + + ngx_imap_close_connection(s->connection); +} + + +void ngx_imap_close_connection(ngx_connection_t *c) { ngx_pool_t *pool;