Justin Erenkrantz wrote:
Okay. I'd be curious to figure out what's going on with the speculative non-blocking reads.
The odd behavior with speculative reads is due to API differences that I didn't take into account.
This makes it behave properly on my laptop with speculative reads. I have no idea if it works with mod_ssl or what speculative buys us.
Greg
--- modules/http/http_request.c.old 2004-11-01 20:05:49.000000000 -0500 +++ modules/http/http_request.c 2004-11-01 20:11:17.000000000 -0500 @@ -206,12 +206,10 @@ /* ### shouldn't this read from the connection input filters? */ /* ### is zero correct? that means "read one line" */ if (r->connection->keepalive != AP_CONN_CLOSE) { - /* if (ap_get_brigade(r->input_filters, bb, AP_MODE_SPECULATIVE, - * APR_NONBLOCK_READ, 1) != APR_SUCCESS) { - */ - if (ap_get_brigade(r->input_filters, bb, AP_MODE_EATCRLF, - APR_NONBLOCK_READ, 0) != APR_SUCCESS) { - c->data_in_input_filters = 0; /* we got APR_EOF or an error */ + if (ap_get_brigade(r->input_filters, bb, AP_MODE_SPECULATIVE, + APR_NONBLOCK_READ, 1) != APR_SUCCESS || + APR_BRIGADE_EMPTY(bb)) { + c->data_in_input_filters = 0; /* no input or an error */ } else { c->data_in_input_filters = 1;