1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

A small cleanup for ap_get_client_block.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86561 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan Bloom
2000-10-12 05:40:46 +00:00
parent 08be79365b
commit 3aed2aae16

View File

@@ -2395,7 +2395,6 @@ API_EXPORT(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz)
ap_bucket *b; ap_bucket *b;
ap_bucket_brigade *bb = ap_brigade_create(r->pool); ap_bucket_brigade *bb = ap_brigade_create(r->pool);
if (!r->read_chunked) { /* Content-length read */ if (!r->read_chunked) { /* Content-length read */
const char *tempbuf; const char *tempbuf;
@@ -2409,15 +2408,15 @@ API_EXPORT(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz)
apr_getsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT, &timeout); apr_getsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT, &timeout);
apr_setsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT, 0); apr_setsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT, 0);
r->connection->remaining = len_to_read; r->connection->remaining = len_to_read;
rv = ap_get_brigade(r->input_filters, bb); if (ap_get_brigade(r->input_filters, bb) != APR_SUCCESS) {
apr_setsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT, timeout); /* if we actually fail here, we want to just return and
} * stop trying to read data from the client.
if (AP_BRIGADE_EMPTY(bb)) { */
if (rv != APR_SUCCESS) { apr_setsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT, timeout);
r->connection->keepalive = -1; r->connection->keepalive = -1;
return -1; return -1;
} }
return 0; apr_setsocketopt(r->connection->client->bsock, APR_SO_TIMEOUT, timeout);
} }
b = AP_BRIGADE_FIRST(bb); b = AP_BRIGADE_FIRST(bb);