mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
RequestServer: Check for empty list of IP addresses in DNS result
Before, if something went wrong with DNS lookup and there were unrelated records (i.e. not A or AAAA) then we would still attempt to build a resolve list. This resulted in curl errors related to the option itself and displayed as "unknown network error" to the user.
This commit is contained in:
parent
6d7b7e7822
commit
17c0d4469c
Notes:
github-actions[bot]
2025-02-02 23:15:19 +00:00
Author: https://github.com/rmg-x Commit: https://github.com/LadybirdBrowser/ladybird/commit/17c0d4469c9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3432
1 changed files with 1 additions and 1 deletions
|
@ -350,7 +350,7 @@ void ConnectionFromClient::start_request(i32 request_id, ByteString const& metho
|
|||
async_request_finished(request_id, 0, Requests::NetworkError::UnableToResolveHost);
|
||||
})
|
||||
.when_resolved([this, request_id, host, url, method, request_body, request_headers, proxy_data](auto const& dns_result) {
|
||||
if (dns_result->records().is_empty()) {
|
||||
if (dns_result->records().is_empty() || dns_result->cached_addresses().is_empty()) {
|
||||
dbgln("StartRequest: DNS lookup failed for '{}'", host);
|
||||
async_request_finished(request_id, 0, Requests::NetworkError::UnableToResolveHost);
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue