| 507 | } |
| 508 | |
| 509 | static int DoraXrtHttpDeliverChunk(DoraXrtHttpStreamContext* ctx, const char* data, size_t len, size_t total) { |
| 510 | if (!ctx || len == 0u || ctx->suppressBody) { |
| 511 | return 1; |
| 512 | } |
| 513 | if (ctx->onChunk && ctx->onChunk(data, len, ctx->received, total, ctx->streamUserData)) { |
| 514 | DoraXrtHttpStreamCloseWith(ctx, XRT_NET_CANCELLED); |
| 515 | return 0; |
| 516 | } |
| 517 | return 1; |
| 518 | } |
| 519 | |
| 520 | static int DoraXrtHttpProcessFixedBody(DoraXrtHttpStreamContext* ctx) { |
| 521 | while (ctx->pendingLen > 0u && ctx->received < ctx->contentLength) { |
no test coverage detected