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

Function output_data_buffered

modules/http2/h2_stream.c:1386–1423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1384}
1385
1386static apr_off_t output_data_buffered(h2_stream *stream, int *peos, int *pheader_blocked)
1387{
1388 /* How much data do we have in our buffers that we can write? */
1389 apr_off_t buf_len = 0;
1390 apr_bucket *b;
1391
1392 *peos = *pheader_blocked = 0;
1393 if (stream->out_buffer) {
1394 b = APR_BRIGADE_FIRST(stream->out_buffer);
1395 while (b != APR_BRIGADE_SENTINEL(stream->out_buffer)) {
1396 if (APR_BUCKET_IS_METADATA(b)) {
1397 if (APR_BUCKET_IS_EOS(b)) {
1398 *peos = 1;
1399 break;
1400 }
1401#if AP_HAS_RESPONSE_BUCKETS
1402 else if (AP_BUCKET_IS_RESPONSE(b)) {
1403 break;
1404 }
1405 else if (AP_BUCKET_IS_HEADERS(b)) {
1406 *pheader_blocked = 1;
1407 break;
1408 }
1409#else
1410 else if (H2_BUCKET_IS_HEADERS(b)) {
1411 *pheader_blocked = 1;
1412 break;
1413 }
1414#endif
1415 }
1416 else {
1417 buf_len += b->length;
1418 }
1419 b = APR_BUCKET_NEXT(b);
1420 }
1421 }
1422 return buf_len;
1423}
1424
1425static ssize_t stream_data_cb(nghttp2_session *ng2s,
1426 int32_t stream_id,

Callers 1

stream_data_cbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected