Bug fixes

This commit is contained in:
2025-11-21 21:10:54 +01:00
parent 51d3f84715
commit 54c02827be
11 changed files with 111 additions and 86 deletions
+3 -7
View File
@@ -268,17 +268,13 @@ int http_request_builder_send(HTTP_RequestBuilder builder)
// Set up target based on host type
if (conn->url.authority.host.mode == HTTP_HOST_MODE_NAME) {
target.type = CONNECT_TARGET_NAME;
target.name = (String) {
conn->url.authority.host.name.ptr,
conn->url.authority.host.name.len
};
target.name = conn->url.authority.host.name;
} else if (conn->url.authority.host.mode == HTTP_HOST_MODE_IPV4) {
target.type = CONNECT_TARGET_IPV4;
target.ipv4 = (IPv4) { conn->url.authority.host.ipv4.data };
target.ipv4 = conn->url.authority.host.ipv4;
} else if (conn->url.authority.host.mode == HTTP_HOST_MODE_IPV6) {
target.type = CONNECT_TARGET_IPV6;
for (int i = 0; i < 8; i++)
target.ipv6.data[i] = conn->url.authority.host.ipv6.data[i];
target.ipv6 = conn->url.authority.host.ipv6;
} else {
// Invalid host mode - clean up connection
http_client_conn_free(conn);