Repository navigation
feat: add public Client core execution path - #15
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5a55c5621
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (read_result.error().code == ErrorCode::ConnectionClosed) { | ||
| auto eof_result = parser.finish_eof(); |
There was a problem hiding this comment.
Propagate connection resets instead of treating them as EOF
When a close-delimited response is interrupted by ECONNRESET/WSAECONNRESET, TcpConnection::read_some() reports ConnectionClosed with a nonzero native error, so this branch calls finish_eof() and returns the partially received body as a successful response. Only an orderly recv() == 0 closure is valid EOF; reset-style closures must remain errors to avoid silently accepting truncated response data.
Useful? React with 👍 / 👎.
Summary
Adds the first public end-to-end HTTP execution path through
Client, connecting the already-merged URL, HTTP serialization/parsing, resolver, and TCP transport layers.Public API
include/cpp_request/client.hppClientrequest(const Request&)Execution pipeline
Client::request()now performs:ResponsereturnTimeout semantics
read_some()operation, matching the transport contractEOF/error behavior
ConnectionClosedis treated as HTTP EOF and passed toResponseParser::finish_eof()UnexpectedEofResult<Response>Tests
Adds local loopback end-to-end coverage for:
All integration tests use local ephemeral loopback sockets only.
Scope
This PR intentionally opens a fresh TCP connection for every request. It does not implement persistent connection reuse or redirect handling yet. Those remain isolated follow-up changes so the basic execution pipeline can stabilize first.