Bug #2796 » 0001-mod_fastcgi-Don-t-clear-FDEVENT_IN-when-stream-respo.patch
src/mod_fastcgi.c | ||
---|---|---|
2555 | 2555 |
fin = 1; |
2556 | 2556 |
break; |
2557 | 2557 |
} |
2558 |
if ((con->conf.stream_response_body & FDEVENT_STREAM_RESPONSE_BUFMIN) |
|
2559 |
&& chunkqueue_length(con->write_queue) > 65536 - 4096) { |
|
2560 |
if (!con->is_writable) { |
|
2561 |
/*(defer removal of FDEVENT_IN interest since |
|
2562 |
* connection_state_machine() might be able to send data |
|
2563 |
* immediately, unless !con->is_writable, where |
|
2564 |
* connection_state_machine() might not loop back to call |
|
2565 |
* mod_fastcgi_handle_subrequest())*/ |
|
2566 |
fdevent_event_clr(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN); |
|
2567 |
} |
|
2568 |
} |
|
2569 | 2558 |
} |
2570 | 2559 |
break; |
2571 | 2560 |
case FCGI_STDERR: |
... | ... | |
2964 | 2953 |
if ((con->conf.stream_response_body & FDEVENT_STREAM_RESPONSE_BUFMIN) |
2965 | 2954 |
&& con->file_started) { |
2966 | 2955 |
if (chunkqueue_length(con->write_queue) > 65536 - 4096) { |
2967 |
fdevent_event_clr(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN); |
|
2968 | 2956 |
} else if (!(fdevent_event_get_interest(srv->ev, hctx->fd) & FDEVENT_IN)) { |
2969 | 2957 |
/* optimistic read from backend, which might re-enable FDEVENT_IN */ |
2970 | 2958 |
handler_t rc = fcgi_recv_response(srv, hctx); /*(might invalidate hctx)*/ |