| 220 | request.path != kLiveSpeechPath) { |
| 221 | return false; |
| 222 | } |
| 223 | const auto it = request.headers.find("transfer-encoding"); |
| 224 | if (it == request.headers.end()) { |
| 225 | return false; |
| 226 | } |
| 227 | return is_chunked_only(it->second); |
| 228 | } |
| 229 | |
| 230 | // De-frames an HTTP/1.1 chunked request body off a live socket into a byte |
| 231 | // stream. `underflow()` blocks in recv() waiting for the next chunk, which is |
| 232 | // precisely the contract `AudioChunkReader` documents for a live source — so a |
| 233 | // streaming task can pull capture-time audio straight through it without the |
| 234 | // body ever being fully materialized. |
| 235 | // |
| 236 | // Bounded on four axes, because this stream is read while a model lock is held: |
| 237 | // an idle timeout between reads, an absolute deadline for the whole body, a cap on |
| 238 | // total bytes, and a cap on any single chunk. A client that opens a body and then |
no test coverage detected