Changes with Apache 2.0.44
+ *) Fix streaming output from an nph- CGI script. CGI:IRC now
+ works. PR 8482 [Jeff Trawick]
+
*) More accurate logging of bytes sent in mod_logio when
the client terminates the connection before the response
is completely sent [Bojan Smojver <bojan@rexursive.com>]
conn_rec *c = f->c;
core_net_rec *net = f->ctx;
core_output_filter_ctx_t *ctx = net->out_ctx;
+ apr_read_type_e eblock = APR_NONBLOCK_READ;
if (ctx == NULL) {
ctx = apr_pcalloc(c->pool, sizeof(*ctx));
const char *str;
apr_size_t n;
- rv = apr_bucket_read(e, &str, &n, APR_BLOCK_READ);
+ rv = apr_bucket_read(e, &str, &n, eblock);
+ if (APR_STATUS_IS_EAGAIN(rv)) {
+ /* send what we have so far since we shouldn't expect more
+ * output for a while... next time we read, block
+ */
+ more = apr_brigade_split(b, e);
+ eblock = APR_BLOCK_READ;
+ break;
+ }
+ eblock = APR_NONBLOCK_READ;
if (n) {
if (!fd) {
if (nvec == MAX_IOVEC_TO_WRITE) {