mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
LibURL/Pattern: Implement URL Pattern canonicalization
These are used to normalize URL components.
This commit is contained in:
parent
f775ee8a93
commit
e70272ddef
Notes:
github-actions[bot]
2025-03-15 11:40:24 +00:00
Author: https://github.com/shannonbooth
Commit: e70272ddef
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3812
Reviewed-by: https://github.com/tcl3
Reviewed-by: https://github.com/trflynn89
3 changed files with 293 additions and 0 deletions
25
Libraries/LibURL/Pattern/Canonicalization.h
Normal file
25
Libraries/LibURL/Pattern/Canonicalization.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <LibURL/Pattern/PatternError.h>
|
||||
|
||||
namespace URL::Pattern {
|
||||
|
||||
PatternErrorOr<String> canonicalize_a_protocol(String const&);
|
||||
String canonicalize_a_username(String const&);
|
||||
String canonicalize_a_password(String const&);
|
||||
PatternErrorOr<String> canonicalize_a_hostname(String const&);
|
||||
PatternErrorOr<String> canonicalize_an_ipv6_hostname(String const&);
|
||||
PatternErrorOr<String> canonicalize_a_port(String const&, Optional<String> const& protocol_value = {});
|
||||
PatternErrorOr<String> canonicalize_a_pathname(String const&);
|
||||
PatternErrorOr<String> canonicalize_an_opaque_pathname(String const&);
|
||||
PatternErrorOr<String> canonicalize_a_search(String const&);
|
||||
PatternErrorOr<String> canonicalize_a_hash(String const&);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue