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
This commit is contained in:
Claude
2025-11-21 19:07:51 +00:00
parent ccdd573e90
commit 2d407b63c2
5 changed files with 98 additions and 25 deletions
+3 -1
View File
@@ -53,7 +53,9 @@ static int servername_callback(SSL *ssl, int *ad, void *arg)
{
ServerSecureContext *ctx = arg;
(void) ad; // TODO: use this?
// The 'ad' parameter is used to set the alert description when returning
// SSL_TLSEXT_ERR_ALERT_FATAL. Since we only return OK or NOACK, it's unused.
(void) ad;
const char *servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
if (servername == NULL)