mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-08-12 13:21:25 +00:00
test.cc says right above the PORT constant that it is only for the legacy fixtures and that new standalone tests must use bind_to_any_port() instead. The six tests added with the insertion-order work all took the shared PORT anyway, which made them one more thing contending for it. Move them to bind_to_any_port() plus listen_after_bind(), the pattern the note asks for and the rest of the standalone tests already use. HeadersOrderTest.ReceivedFieldsKeepTheirOrder sends a raw request rather than going through Client, so send_request() gains an optional port that defaults to PORT and leaves its other 36 callers alone. Checked by holding PORT open from another process while running the six: they pass, where before the change listen(HOST, PORT) would have failed.