comparison src/mail/ngx_mail_proxy_module.c @ 1348:fe5c88df87f5 stable-0.5

r1343 merge: fix case when client has closed connection but upstream buffer is not empty
author Igor Sysoev <igor@sysoev.ru>
date Sun, 29 Jul 2007 17:29:06 +0000
parents bde5e4134759
children f69493e8faab
comparison
equal deleted inserted replaced
1347:142d979bc738 1348:fe5c88df87f5
864 break; 864 break;
865 } 865 }
866 866
867 c->log->action = "proxying"; 867 c->log->action = "proxying";
868 868
869 if ((s->connection->read->eof || s->proxy->upstream.connection->read->eof) 869 if ((s->connection->read->eof && s->buffer->pos == s->buffer->last)
870 && s->buffer->pos == s->buffer->last 870 || (s->proxy->upstream.connection->read->eof
871 && s->proxy->buffer->pos == s->proxy->buffer->last) 871 && s->proxy->buffer->pos == s->proxy->buffer->last)
872 || (s->connection->read->eof
873 && s->proxy->upstream.connection->read->eof))
872 { 874 {
873 action = c->log->action; 875 action = c->log->action;
874 c->log->action = NULL; 876 c->log->action = NULL;
875 ngx_log_error(NGX_LOG_INFO, c->log, 0, "proxied session done"); 877 ngx_log_error(NGX_LOG_INFO, c->log, 0, "proxied session done");
876 c->log->action = action; 878 c->log->action = action;