Based on code review feedback: Client improvements: - Remove redundant capacity check in http_client_get_builder (already verified num_conns < capacity) - Fix generation counter - no longer reset to zero when allocating connections, only incremented on request send - Add HTTP_Method parameter to http_request_builder_url instead of hardcoding GET method - Free connection resources when http_request_builder_send fails (invalid host mode or socket_connect failure) Server bug fix: - Fix ready queue indexing in http_server_next_request Changed: &server->conns[server->ready_head] To: &server->conns[server->ready[server->ready_head]] This bug would have caused incorrect connection retrieval All changes maintain consistency with the codebase style and improve robustness of error handling.
13 lines
263 B
Makefile
13 lines
263 B
Makefile
.PHONY: all clean example
|
|
|
|
all: chttp.c chttp.h example
|
|
|
|
chttp.c chttp.h: $(wildcard src/*.c src/*.h) misc/amalg.py Makefile
|
|
python misc/amalg.py
|
|
|
|
example: main.c chttp.c chttp.h
|
|
gcc main.c chttp.c -o example -Wfatal-errors -lws2_32
|
|
|
|
clean:
|
|
rm chttp.c chttp.h
|