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.
This commit is contained in:
+1
-1
@@ -435,7 +435,7 @@ static int is_scheme_body(char c)
|
||||
// Note: percent-encoded characters (%XX) are not currently validated
|
||||
static int is_userinfo(char c)
|
||||
{
|
||||
return is_unreserved(c) || is_sub_delim(c) || c == ':' || c == '%';
|
||||
return is_unreserved(c) || is_sub_delim(c) || c == ':';
|
||||
}
|
||||
|
||||
// authority = [ userinfo "@" ] host [ ":" port ]
|
||||
|
||||
Reference in New Issue
Block a user