OmniNet 0.8.2: HTTP Client Phase 7 (streaming) + EOF detection fixes
Phase 7: streaming bodies
Request streaming (chunked upload) via ClientRequest::set_body_writer()
Response streaming via ClientResponseStream::read_some()/read_all()
Client::send_streaming(req) returns ClientResponseStream
Supports Transfer-Encoding: chunked, Content-Length, close-delimited
EOF detection fix (post-Phase-7 bug)
Socket::recvAll() is misleadingly named -- does a single recv()
and returns empty on EAGAIN/EWOULDBLOCK (indistinguishable from EOF).
HttpClient now drives its own recv() loop with waitForRead()
timeout (50ms) so 'no data yet' vs 'peer closed' are correctly
distinguished. recv() is wrapped in try/catch to handle abrupt
peer closes.
Files added/modified:
src/http/HttpClient.h: ClientResponseStream, ClientRequest::set_body_writer,
Client::send_streaming
src/http/HttpClient.cpp: readAll uses recv() loop, recv() wrapped in
try/catch, fetch() waits before recv
tests/test_http_client.cpp: streaming test cases
Tests:
test_omnet_test: 110/110 PASS (no regressions)
test_http_client streaming tests verified to work end-to-end
Commit: 469f2b5