mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:57:35 +00:00
LibWeb: Implement 'Default User-Agent
value' AO
This commit is contained in:
parent
5ee9feb9cf
commit
6deb5ce9b5
3 changed files with 10 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <LibWeb/Fetch/Infrastructure/HTTP.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Headers.h>
|
||||
#include <LibWeb/Infra/ByteSequences.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/MimeSniff/MimeType.h>
|
||||
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
@ -686,4 +687,11 @@ Optional<RangeHeaderValue> parse_single_range_header_value(ReadonlyBytes value)
|
|||
return RangeHeaderValue { move(range_start_value), move(range_end_value) };
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#default-user-agent-value
|
||||
ErrorOr<ByteBuffer> default_user_agent_value()
|
||||
{
|
||||
// A default `User-Agent` value is an implementation-defined header value for the `User-Agent` header.
|
||||
return ByteBuffer::copy(default_user_agent.bytes());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue