return APR_ECONNABORTED;
}
- if (io->eos_out) {
+ if (io->eos_out_read) {
*plen = 0;
*peos = 1;
return APR_SUCCESS;
else {
status = h2_util_bb_readx(io->bbout, cb, ctx, plen, peos);
if (status == APR_SUCCESS) {
- io->eos_out = *peos;
+ io->eos_out_read = *peos;
}
}
return APR_ECONNABORTED;
}
- if (io->eos_out) {
+ if (io->eos_out_read) {
*plen = 0;
*peos = 1;
return APR_SUCCESS;
return APR_EAGAIN;
}
- io->eos_out = *peos = h2_util_has_eos(io->bbout, *plen);
+ io->eos_out_read = *peos = h2_util_has_eos(io->bbout, *plen);
return h2_util_move(bb, io->bbout, *plen, NULL, "h2_io_read_to");
}
if (io->rst_error) {
return APR_ECONNABORTED;
}
- if (!io->eos_out) { /* EOS has not been read yet */
+ if (!io->eos_out_read) { /* EOS has not been read yet */
process_trailers(io, trailers);
if (!io->bbout) {
io->bbout = apr_brigade_create(io->pool, io->bucket_alloc);
}
- if (!h2_util_has_eos(io->bbout, -1)) {
- APR_BRIGADE_INSERT_TAIL(io->bbout,
- apr_bucket_eos_create(io->bucket_alloc));
+ if (!io->eos_out) {
+ io->eos_out = 1;
+ if (!h2_util_has_eos(io->bbout, -1)) {
+ APR_BRIGADE_INSERT_TAIL(io->bbout,
+ apr_bucket_eos_create(io->bucket_alloc));
+ }
}
}
return APR_SUCCESS;
unsigned int request_body : 1; /* iff request has body */
unsigned int eos_in : 1; /* input eos has been seen */
unsigned int eos_in_written : 1; /* input eos has been forwarded */
- unsigned int eos_out : 1; /* output eos has been seen */
+ unsigned int eos_out : 1; /* output eos is present */
+ unsigned int eos_out_read : 1; /* output eos has been forwarded */
h2_io_op timed_op; /* which operation is waited on, if any */
struct apr_thread_cond_t *timed_cond; /* condition to wait on, maybe NULL */