RequestServer: Remove check for square brackets in host before resolving

This is no longer needed since `IPv6Address::from_string` supports
square brackets. After the update to curl, `CURLOPT_RESOLVE` now
supports replacing IPv6 hosts as well.
This commit is contained in:
rmg-x 2025-04-05 11:22:50 -05:00 committed by Tim Flynn
parent 6480e1a3fe
commit 27c19c02d2
Notes: github-actions[bot] 2025-04-05 18:27:11 +00:00

View file

@ -376,10 +376,6 @@ void ConnectionFromClient::start_request(i32 request_id, ByteString method, URL:
{
auto host = url.serialized_host().to_byte_string();
// Check if host has the bracket notation for IPV6 addresses and remove them
if (host.starts_with("["sv) && host.ends_with("]"sv))
host = host.substring(1, host.length() - 2);
m_resolver->dns.lookup(host, DNS::Messages::Class::IN, { DNS::Messages::ResourceType::A, DNS::Messages::ResourceType::AAAA })
->when_rejected([this, request_id](auto const& error) {
dbgln("StartRequest: DNS lookup failed: {}", error);