2022-02-11 20:53:47 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
2022-07-10 19:25:42 +02:00
|
|
|
#include <LibWeb/Fetch/Infrastructure/HTTP.h>
|
2025-11-26 14:13:23 -05:00
|
|
|
#include <LibWeb/Loader/ResourceLoader.h>
|
2022-02-11 20:53:47 +00:00
|
|
|
|
2022-07-17 23:52:02 +01:00
|
|
|
namespace Web::Fetch::Infrastructure {
|
2022-02-11 20:53:47 +00:00
|
|
|
|
2025-11-26 14:13:23 -05:00
|
|
|
// https://fetch.spec.whatwg.org/#default-user-agent-value
|
|
|
|
|
ByteString const& default_user_agent_value()
|
2022-02-11 20:53:47 +00:00
|
|
|
{
|
2025-11-26 14:13:23 -05:00
|
|
|
// A default `User-Agent` value is an implementation-defined header value for the `User-Agent` header.
|
|
|
|
|
static auto user_agent = ResourceLoader::the().user_agent().to_byte_string();
|
|
|
|
|
return user_agent;
|
2022-02-11 20:53:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|