Klaus Demo nginx / 60609f2
Event pipe: disabled c->read->available checking for SSL. In SSL connections, data can be buffered by the SSL layer, and it is wrong to avoid doing c->recv_chain() if c->read->available is 0 and c->read->pending_eof is set. And tests show that the optimization in question indeed can result in incorrect detection of premature connection close if upstream closes the connection without sending a close notify alert at the same time. Fix is to disable c->read->available optimization for SSL connections. Maxim Dounin 2 years ago
1 changed file(s) with 5 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
171171 */
172172
173173 if (p->upstream->read->available == 0
174 && p->upstream->read->pending_eof)
174 && p->upstream->read->pending_eof
175 #if (NGX_SSL)
176 && !p->upstream->ssl
177 #endif
178 )
175179 {
176180 p->upstream->read->ready = 0;
177181 p->upstream->read->eof = 1;