Skip to content

Commit b673a7e

Browse files
khanayan123claude
andcommitted
fix: include request_headers in MockHTTPClient::clear()
The suggestion to use client->clear() instead of client->request_headers.items.clear() exposed that clear() only reset request_body. Update it to also clear request_headers so the heartbeat session-header test validates fresh headers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b3c0f73 commit b673a7e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/mocks/http_clients.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ struct MockHTTPClient : public HTTPClient {
4141
ErrorHandler on_error_;
4242
std::string request_body;
4343

44-
void clear() { request_body = ""; }
44+
void clear() {
45+
request_body = "";
46+
request_headers.items.clear();
47+
}
4548

4649
Expected<void> post(
4750
const URL&, HeadersSetter set_headers, std::string body,

0 commit comments

Comments
 (0)