cozis
e686e477e2
Ignore socket events when an HTTP response is being built by the user
2025-12-03 18:40:26 +01:00
cozis
f6d81c1a87
Add -Wall -Wextra flags to the build script and fix the resulting compiler warnings
2025-12-02 12:02:59 +01:00
cozis
954bcb7e3e
Add option for HTTPS clients to not verify the peer's certificate
2025-11-29 19:56:09 +01:00
cozis
008772aef1
Fix bug in response builder state machine
2025-11-27 21:02:31 +01:00
cozis
b87a78a023
Add proxy example (draft)
2025-11-27 00:32:12 +01:00
cozis
c4c41653f4
Add error codes
2025-11-26 22:38:37 +01:00
cozis
52ee89252c
Properly consume socket events in the server when the socket manager reports them
2025-11-26 15:42:05 +01:00
cozis
cb80bc3c14
Fix typo
2025-11-23 09:29:32 +01:00
cozis
fa9b0e9919
Add zero-copy interface version of http_response_builder_body
2025-11-22 23:51:43 +01:00
cozis
eec1174047
Fix issues that caused the server to hang
2025-11-21 23:57:24 +01:00
cozis
54c02827be
Bug fixes
2025-11-21 21:10:54 +01:00
Claude and cozis
51d3f84715
Address code review feedback for HTTP client and server
...
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.
2025-11-21 20:37:18 +01:00
Claude
2d407b63c2
Fix TODOs unrelated to HTTP client
...
- Add documentation comments for print_bytes() and HTTP_UNPACK macro in src/basic.h
- Improve error handling in src/socket.c: add checks for ioctlsocket, socket creation,
and connection failures; implement socket_manager_wakeup with proper signaling;
consume wakeup signals; add memory cleanup for registered names
- Add header validation in src/server.c to prevent HTTP response splitting attacks
- Enhance HTTP parsing in src/parse.c: support percent-encoded characters in userinfo,
expand HTTP methods without request bodies, add response body detection logic,
improve cookie parsing comments
- Document unused 'ad' parameter in src/secure_context.c SNI callback
2025-11-21 19:07:51 +00:00
cozis
3c2ef70c66
Fix compiler errors
2025-11-21 18:30:35 +01:00
cozis
aab1b8e7b8
Fix more compilation errors
2025-11-21 15:12:32 +01:00
Claude
93ccb5d6a1
Fix minor refactoring errors
...
Minor fixes:
- Add missing includes in src/includes.h (stdbool, string, stdlib, poll, fcntl, errno, netdb, arpa/inet, netinet/in)
- Fix empty Mutex struct in src/thread.h
- Fix String -> HTTP_String typos in 5 source files
- Fix server_secure_context_add_certificate missing key_file parameter
Non-trivial issues remain (see PR description for details)
2025-11-21 12:15:11 +00:00
cozis
879dc74e34
First version of the refactor
2025-11-21 12:53:03 +01:00
cozis
13c578d347
Remove router
2025-10-17 10:50:49 +02:00
cozis
b1021deb15
Add secure field to HTTP_Request to mark whether the underlying connection uses TLS or not
2025-09-18 09:19:38 +02:00
cozis
c134de645b
Rename HTTP_ResponseHandle to HTTP_ResponseBuilder
2025-07-21 23:30:32 +02:00
cozis
73263da2c9
Fix the HTTPS build
2025-07-21 22:42:43 +02:00
cozis
a2912b5191
Refactoring for an improved event loop
2025-07-21 20:29:35 +02:00
cozis
5cb3977c3c
Fix windows compilation errors
2025-07-21 12:06:23 +02:00
cozis
acf4746611
Simplify amalgamation script
2025-07-21 02:21:33 +02:00
cozis
c3bfb86707
Fix compiler errors
2025-07-20 23:53:23 +02:00
cozis
3201eac013
Fix compiler errors
2025-07-20 21:19:58 +02:00
cozis
dba15c946e
Rename http.c/.h to chttp.c/.h and improve amalgamation formatting
2025-07-20 18:33:51 +02:00
cozis
51cae898f8
Rewrite
2025-07-20 16:46:08 +02:00