MCPcopy Create free account
hub / github.com/apache/httpd / has_buffered_data

Function has_buffered_data

modules/ssl/ssl_engine_kernel.c:44–62  ·  view source on GitHub ↗

Perform a speculative (and non-blocking) read from the connection * filters for the given request, to determine whether there is any * pending data to read. Return non-zero if there is, else zero. */

Source from the content-addressed store, hash-verified

42 * filters for the given request, to determine whether there is any
43 * pending data to read. Return non-zero if there is, else zero. */
44static int has_buffered_data(request_rec *r)
45{
46 apr_bucket_brigade *bb;
47 apr_off_t len;
48 apr_status_t rv;
49 int result;
50
51 bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
52
53 rv = ap_get_brigade(r->connection->input_filters, bb, AP_MODE_SPECULATIVE,
54 APR_NONBLOCK_READ, 1);
55 result = rv == APR_SUCCESS
56 && apr_brigade_length(bb, 1, &len) == APR_SUCCESS
57 && len > 0;
58
59 apr_brigade_destroy(bb);
60
61 return result;
62}
63
64/* If a renegotiation is required for the location, and the request
65 * includes a message body (and the client has not requested a "100

Callers 1

ssl_hook_Access_classicFunction · 0.85

Calls 1

ap_get_brigadeFunction · 0.85

Tested by

no test coverage detected