LibWebSocket+RequestServer: Resolve WebSocket hosts using our resolver
Some checks failed
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Build Dev Container Image / build (push) Has been cancelled

This commit is contained in:
Andrew Kaster 2025-02-20 05:21:22 -07:00 committed by Andrew Kaster
commit 06faa7b160
Notes: github-actions[bot] 2025-02-20 22:05:53 +00:00
5 changed files with 82 additions and 42 deletions

View file

@ -7,6 +7,7 @@
#pragma once
#include <AK/Vector.h>
#include <LibDNS/Resolver.h>
#include <LibHTTP/HeaderMap.h>
#include <LibURL/URL.h>
@ -33,6 +34,9 @@ public:
Optional<ByteString> const& root_certificates_path() const { return m_root_certificates_path; }
void set_root_certificates_path(Optional<ByteString> root_certificates_path) { m_root_certificates_path = move(root_certificates_path); }
Optional<DNS::LookupResult const&> dns_result() const { return m_dns_result ? Optional<DNS::LookupResult const&>(*m_dns_result) : OptionalNone {}; }
void set_dns_result(NonnullRefPtr<DNS::LookupResult const> dns_result) { m_dns_result = move(dns_result); }
// secure flag - defined in RFC 6455 Section 3
bool is_secure() const;
@ -46,6 +50,7 @@ private:
Vector<ByteString> m_extensions {};
HTTP::HeaderMap m_headers;
Optional<ByteString> m_root_certificates_path;
RefPtr<DNS::LookupResult const> m_dns_result;
};
}